@spscommerce/ds-react 6.21.0 → 6.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs.js +94 -94
- package/lib/index.es.js +58 -19
- package/package.json +9 -9
package/lib/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ZS=Object.defineProperty,XS=Object.defineProperties;var QS=Object.getOwnPropertyDescriptors;var rs=Object.getOwnPropertySymbols;var jl=Object.prototype.hasOwnProperty,ql=Object.prototype.propertyIsEnumerable;var Jl=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,
|
|
1
|
+
"use strict";var ZS=Object.defineProperty,XS=Object.defineProperties;var QS=Object.getOwnPropertyDescriptors;var rs=Object.getOwnPropertySymbols;var jl=Object.prototype.hasOwnProperty,ql=Object.prototype.propertyIsEnumerable;var Jl=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N=(e,t)=>{for(var n in t||(t={}))jl.call(t,n)&&Jl(e,n,t[n]);if(rs)for(var n of rs(t))ql.call(t,n)&&Jl(e,n,t[n]);return e},G=(e,t)=>XS(e,QS(t));var z=(e,t)=>{var n={};for(var s in e)jl.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&rs)for(var s of rs(e))t.indexOf(s)<0&&ql.call(e,s)&&(n[s]=e[s]);return n};Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";var H=require("react"),_=require("@spscommerce/ds-shared"),T=require("@spscommerce/utils"),Zl=require("moment-timezone"),Hr=require("react-dom"),eb=require("@react-stately/collections"),Wr=require("@spscommerce/ds-colors"),Xl=require("@spscommerce/ds-illustrations");function Gr(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function Ql(e){if(e&&e.__esModule)return e;var t={__proto__:null,[Symbol.toStringTag]:"Module"};return e&&Object.keys(e).forEach(function(n){if(n!=="default"){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var a=Ql(H),P=Gr(H),Wn=Ql(Zl),rt=Gr(Zl),tb=Gr(Hr);function ec(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ec(e[t]))&&(s&&(s+=" "),s+=n);else for(t in e)e[t]&&(s&&(s+=" "),s+=t);return s}function K(){for(var e=0,t,n,s="";e<arguments.length;)(t=arguments[e++])&&(n=ec(t))&&(s&&(s+=" "),s+=n);return s}var At=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Pt(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 y={exports:{}},nb="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ab=nb,sb=ab;function tc(){}function nc(){}nc.resetWarningCache=tc;var rb=function(){function e(s,o,i,c,l,p){if(p!==sb){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:nc,resetWarningCache:tc};return n.PropTypes=n,n};y.exports=rb();function be(e){return y.exports.oneOf(T.values(e))}function ne(){return y.exports.func}function ce(){return y.exports.object}function Ft(){return y.exports.object}const dt=y.exports.oneOfType([y.exports.node,y.exports.func]),Y={children:y.exports.oneOfType([y.exports.arrayOf(y.exports.node),y.exports.node]),className:y.exports.string,"data-testid":y.exports.string,unsafelyReplaceClassName:y.exports.string},Oe=a.createContext(_.noI18nI18n),ob={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"},ib=G(N({},Y),{disabled:y.exports.bool,href:y.exports.string,icon:be(_.SpsIcon),kind:be(_.ButtonKind),spinning:y.exports.bool,spinningTitle:y.exports.string,type:be(_.ButtonType)});function Fe(e){const C=e,{children:t,className:n,href:s,icon:o,kind:i=_.ButtonKind.DEFAULT,spinning:c,spinningTitle:l,type:p=_.ButtonType.BUTTON,unsafelyReplaceClassName:u}=C,f=z(C,["children","className","href","icon","kind","spinning","spinningTitle","type","unsafelyReplaceClassName"]);let{disabled:m}=e;c&&(m=!0);const{t:g}=a.useContext(Oe),S=K(u||"sps-button",`sps-button--${i}`,m&&"sps-button--disabled",c&&"sps-button--spinning",n),w=o&&a.createElement("i",{className:K("sps-icon",`sps-icon-${o}`),"aria-hidden":"true"}),x=c&&a.createElement("div",{className:"sps-spinner"},l||g("design-system:button.spinningTitle"));return a.createElement("div",{className:S},s?a.createElement("a",G(N({},f),{href:s,className:"sps-button__clickable-element"}),w,t,x):a.createElement("button",G(N({},f),{type:p,className:"sps-button__clickable-element",disabled:m}),w,t,x))}Object.assign(Fe,{props:ob,propTypes:ib,displayName:"SpsButton"});const ac={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},sc=G(N({},Y),{formArray:ce(),formGroup:ce(),formMeta:ce(),onSubmit:ne()}),ga=a.forwardRef((e,t)=>{const f=e,{children:n,onSubmit:s,formArray:o,formGroup:i,formMeta:c}=f,l=z(f,["children","onSubmit","formArray","formGroup","formMeta"]),p=i||o;function u(m){m.preventDefault(),p&&p.markAsDirty(),c&&(c.markAsDirty(),c.markAsBlurred(),c.markAsSubmitted()),s(m)}return a.createElement("form",N({ref:t,onSubmit:u},l),n)});Object.assign(ga,{props:ac,propTypes:sc,displayName:"SpsForm"});function ft(e){return typeof e=="function"?e():e}const lb=G(N({},ac),{controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"}),cb=G(N(N({},Y),sc),{controlsDisabled:y.exports.bool,footerLinks:dt,formArray:ce(),formGroup:ce(),formMeta:ce(),isOpen:y.exports.bool,onClear:ne(),onSubmit:ne()});function Ur(e){const C=e,{children:t,className:n,controlsDisabled:s,footerLinks:o,formArray:i,formGroup:c,formMeta:l,isOpen:p,onClear:u,onSubmit:f,unsafelyReplaceClassName:m}=C,g=z(C,["children","className","controlsDisabled","footerLinks","formArray","formGroup","formMeta","isOpen","onClear","onSubmit","unsafelyReplaceClassName"]),{t:S}=a.useContext(Oe);function w(){u&&u()}const x=K(m||"sps-advanced-search",p&&"sps-advanced-search--open",n);return a.createElement("div",N({className:x},g),a.createElement(ga,{onSubmit:f,formArray:i,formGroup:c,formMeta:l},a.createElement("div",{className:"sps-advanced-search__form"},t),a.createElement("div",{className:"sps-advanced-search__footer"},o&&a.createElement("div",{id:"footer_links"},ft(o)),a.createElement("div",{className:"sps-advanced-search__footer-controls"},a.createElement(Fe,{kind:_.ButtonKind.DEFAULT,type:_.ButtonType.BUTTON,className:"mr-2",onClick:w,disabled:s},S("design-system:advancedSearch.clear")),a.createElement(Fe,{kind:_.ButtonKind.KEY,type:_.ButtonType.SUBMIT,disabled:s},S("design-system:advancedSearch.search"))))))}Object.assign(Ur,{props:lb,propTypes:cb,displayName:"SpsAdvancedSearch"});const rc={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>a.createElement(a.Fragment,null,a.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).'),a.createElement("p",null,"Advanced Search works in conjunction with the"," ",a.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",a.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),a.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",a.createElement("ul",null,a.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),a.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"," ",a.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",a.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.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 ",a.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:T.code`
|
|
2
2
|
function Component(props) {
|
|
3
3
|
const [toolbarSearchText, setToolbarSearchText] = React.useState("");
|
|
4
4
|
const [advSearch, patchAdvSearch] = usePatchReducer({
|
|
@@ -193,10 +193,10 @@
|
|
|
193
193
|
</SpsAdvancedSearch>
|
|
194
194
|
</>;
|
|
195
195
|
}
|
|
196
|
-
`}}}};let sn=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function Gn(e){return $.useRef(e||sn())}function Tt(e,t){const n=Gn(e),s=$.useRef(`${n.current}_ctrl`);return $.useEffect(()=>{t&&(t.id=s.current,t.update())},[t]),{wrapperId:n.current,controlId:s.current}}var db="[object Object]";function pb(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function ub(e,t){return function(n){return e(t(n))}}var mb=Function.prototype,oc=Object.prototype,ic=mb.toString,fb=oc.hasOwnProperty,hb=ic.call(Object),gb=oc.toString,Sb=ub(Object.getPrototypeOf,Object);function bb(e){return!!e&&typeof e=="object"}function vb(e){if(!bb(e)||gb.call(e)!=db||pb(e))return!1;var t=Sb(e);if(t===null)return!0;var n=fb.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ic.call(n)==hb}var lc=vb;const kt=new Set,Un=new Set,Xt=new Set,Sa=new Set;function cc(e){kt.has(e)||Xt.has(e)||Sa.has(e)||Un.add(e)}function dc(e){kt.has(e)||Xt.has(e)||Un.has(e)||Sa.add(e)}const Yr=Wn.default||Wn,os="MM/DD/YYYY",yb=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,pc=Symbol("Date Parse Error");function Yn(e){return e.year*1e4+e.month*100+e.date}const he=Object.freeze({createFrom(e){if(!e)return null;if(typeof e=="string"){const t=yb.exec(e);if(t){const[,n,s,o]=t;return Object.freeze({year:Number(o),month:Number(n),date:Number(s)})}return Object.freeze({[pc]:!0,year:void 0,month:void 0,date:void 0})}return Object.freeze({year:e.year(),month:e.month()+1,date:e.date()})},createRangeFrom(e){return e?e.split(/[^\d]*-[^\d]*/).map(he.createFrom):null},isValid(e){return e&&typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&he.toMoment(e).isValid()},nullifyInvalidDate(e){return he.isValid(e)?e:null},toMoment(e){return e?Yr(H(k({},e),{month:e.month-1})):null},toString(e){const t=he.toMoment(e);return t?t.format(os):""},toStringRange(e){return e?e.map(he.toString).join("-"):""},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:Yn(e)>Yn(t)},isBefore(e,t){return!e||!t?null:Yn(e)<Yn(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const s=Yn(e),[o,i]=t.map(Yn);return e&&o&&i&&(n&&s>=o&&s<=i||!n&&s>o&&s<i)},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){if(typeof e.definition=="function")return e.definition();const t=Yr(),n=t.clone().subtract(Yr.duration(e.definition));return[he.createFrom(n),he.createFrom(t)]}}),ba=function(t){if(Array.isArray(t)){const n=ba(t[0]),s=ba(t[1]);return n||s}if(t&&t.hasOwnProperty("year")){if(t[pc])return{dateFormat:os};if(!he.isValid(t))return{dateValidity:!0}}return null};kt.add("dateFormat");kt.add("dateValidity");const uc=function(t){if(Array.isArray(t)){const n=ba(t);if(n)return n;if(t&&he.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};kt.add("dateRangeOrder");const mc=function({minDate:t,maxDate:n}){function s(o){const i=he.isBefore(o,t),c=he.isAfter(o,n),l={minExceeded:i?he.toString(t):null,maxExceeded:c?he.toString(n):null};return i||c?{dateConstraint:l}:null}return function(i){if(!i)return null;if(Array.isArray(i)){const c=s(i[0]),l=s(i[1]);return c||l}return i.hasOwnProperty("year")?s(i):null}};kt.add("dateConstraint");var Tb=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",date:ba,dateRange:uc,dateConstraint:mc});function rn(e,t){for(const n of[].concat(e)){const s=t(n);if(s)return s}return null}const wb=function(t){function n(s){return Number(s)>=t?null:{min:t}}return s=>rn(s,n)};kt.add("min");const Eb=function(t){function n(s){return Number(s)<=t?null:{max:t}}return s=>rn(s,n)};Un.add("max");const Cb=function(t){return typeof t=="undefined"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};Un.add("required");const xb=function(t){function n(s){return s.length>=t?null:{minLength:t}}return s=>rn(s,n)};kt.add("minLength");const Db=function(t){function n(s){return s.length<=t?null:{maxLength:t}}return s=>rn(s,n)};Xt.add("maxLength");const Ib=function(t){const n=t instanceof RegExp?t:new RegExp(t);function s(o){return n.test(o)?null:{pattern:t}}return o=>rn(o,s)};kt.add("pattern");const Nb=function(e){function t(n){return/^\p{L}*$/u.test(n)?null:{alpha:!0}}return rn(e,t)};Xt.add("alpha");const kb=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return rn(e,t)};Xt.add("numeric");const Mb=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return rn(e,t)};Xt.add("nonNumeric");const is=Object.freeze(H(k({},Tb),{min:wb,max:Eb,required:Cb,minLength:xb,maxLength:Db,pattern:Ib,alpha:Nb,numeric:kb,nonNumeric:Mb,OnBlurErrorKeys:kt}));function va(e,t=[]){const n=t.reduce((s,o)=>Object.assign(s,o(e)||{}),{});return Object.keys(n).length?n:null}class wn{constructor(t,n){this.path=t,this.update=n,this.validators=[],this.errors=null,this.revealAllErrors=!1,this.preventativeErrors=[],this.submitted=!1}setValidators(t){return this.update(this.path,null,null,t),this}validate(t){return this.validators&&this.validators.length>0?(this.errors=va(t,this.validators),this.update(null),this.isFocused()&&this.onFocus&&this.onFocus()):this.errors&&(this.errors=null,this.update(null)),this}isValid(){return!this.errors||this.isPristine()}hasErrors(){return!!this.errors}isVisibilyInvalid(){return this.errors&&(this.revealAllErrors&&!Object.keys(this.errors).some(t=>Sa.has(t))||this.revealAllErrors&&Object.keys(this.errors).some(t=>Sa.has(t))&&this.isSubmitted()||!this.isPristine()&&Object.keys(this.errors).some(t=>Un.has(t)))}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(is.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}class En extends wn{constructor(){super(...arguments);this.id=sn(),this.focused=!1,this.pristine=!0}setValue(t){if(this.revealAllErrors=!1,this.preventativeErrors=[],this.validators&&this.validators.length>0){const n=va(t,this.validators);if(n&&Object.keys(n).filter(o=>Xt.has(o)).length>0){this.preventativeErrors=Object.keys(n);return}}this.update(this.path,t)}isPristine(){return this.pristine}markAsPristine(){return this.pristine=!0,this.revealAllErrors=!1,this.update(null),this}markAsDirty(){return this.pristine=!1,this.update(null),this}isFocused(){return this.focused}markAsFocused(){return this.focused=!0,this.update(null),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(null),this}}class ls extends En{constructor(t,n,s){const o=s?n:t,i=s||n;super(o,i);s&&this.inferMembers(t)}inferSpsControl(t,n){return cs(t,[...this.path,n],this.update)}rollup(t){return Object.keys(this.fields).reduce((n,s)=>n&&(!this.fields[s][t]||this.fields[s][t]()),!0)}isFocused(){return super.isFocused()||this.rollup("isFocused")}isValid(){return super.isValid()&&this.rollup("isValid")}hasErrors(){return super.hasErrors()||Object.keys(this.fields).some(t=>this.fields[t].hasErrors())}contentsAreValid(){return this.rollup("isValid")&&this.rollup("contentsAreValid")}isPristine(){return super.isPristine()&&this.rollup("isPristine")}markAsPristine(){super.markAsPristine();for(const t of Object.keys(this.fields))this.fields[t].markAsPristine();return this}markAsDirty(){super.markAsDirty();for(const t of Object.keys(this.fields))this.fields[t].markAsDirty();return this}markAsBlurred(){super.markAsBlurred();for(const t of Object.keys(this.fields))this.fields[t].markAsBlurred();return this}markAsSubmitted(){super.markAsSubmitted();for(const t of Object.keys(this.fields))this.fields[t].markAsSubmitted();return this}}class fc extends ls{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class hc extends ls{inferMembers(t){this.fields=t.map((n,s)=>this.inferSpsControl(n,String(s)))}}function cs(e,t,n){return e instanceof wn?(e.path=t,e.update=n,e):Array.isArray(e)?new hc(e,t,n):lc(e)?new fc(e,t,n):new En(t,n)}function zr(e,t){return t.length===0||!e?e:zr(e.fields[t[0]],t.slice(1,t.length))}function jr(e,t){if(t.length===0||!e)return[e];const n=t[0];if(t=t.slice(1,t.length),n==="*"){const s=Array.isArray(e.fields)?e.fields:Object.keys(e.fields).map(o=>e.fields[o]);return t.length===0?s:s.reduce((o,i)=>[...o,...jr(i,t)],[])}return jr(e.fields[n],t)}function gc(e,t,n){for(const s of Object.keys(t)){const o=t[s];for(const i of jr(e,s.split(".")))i&&o&&n(i,o)}}function ds(e,t,n,s=!1){gc(t,n,(o,i)=>{o.validators=typeof i=="function"?i(e):i,s&&(o.errors=va(T.getPath(e,o.path),o.validators))})}function qr(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((s,o)=>o===Number(n)?qr(s,t):s):lc(e)?Object.keys(e).reduce((s,o)=>Object.assign(s,{[o]:o===n?qr(e[o],t):e[o]}),{}):e}function _b(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function Rb(e,t){_b(e);const n=$.useMemo(()=>{T.deepFreeze(e);const f=cs(e,[],p);return t&&ds(e,f,t,!0),f},[]),s=$.useRef(),o=$.useRef(t),i=$.useCallback((f,m)=>{var S,w,x;let g;if(s.current=null,m)if(m.path)if(m.markAsBlurred){const E=zr(f.formMeta,m.path);E&&(E.focused=!1,E.revealAllErrors=!0)}else if(m.newValidators){if(o.current){const E=m.path.join(".");o.current=H(k({},o.current),{[E]:m.newValidators}),ds(f.formValue,f.formMeta,o.current,!0)}}else g=qr(f.formValue,m.path),T.setPath(g,m.path,m.value);else g=m.value;if(((S=m.updateFormOptions)==null?void 0:S.validators)&&(o.current=k(k({},o.current),m.updateFormOptions.validators),ds(f.formValue,f.formMeta,o.current,(x=(w=m.updateFormOptions)==null?void 0:w.runValidators)!=null?x:!0)),g){T.deepFreeze(g);const E=T.diff(f.formValue,g);for(const{type:D,key:I,parentPath:v,objects:[N,_]}of E){const O=zr(f.formMeta,v);if(typeof I!="symbol"&&O)switch(D){case T.DiffChange.ADDITION:O.fields[I]=cs(_[I],[...v,I],p);break;case T.DiffChange.DELETION:Array.isArray(O.fields)?O.fields.splice(Number(I),1):delete O.fields[I];break;case T.DiffChange.ALTERATION:if(!N[I]&&_[I]&&!(O.fields[I]instanceof ls)){const R=cs(_[I],[...v,I],p);R instanceof En&&O.fields[I]instanceof En&&(R.id=O.fields[I].id,R.focused=O.fields[I].focused,R.pristine=O.fields[I].pristine),O.fields[I]=R}break}}if(o.current){ds(g,f.formMeta,o.current);const D=new Set;gc(f.formMeta,t,(I,v)=>{typeof v=="function"&&(I.validate(T.getPath(g,I.path)),D.add(I))});for(const{type:I,key:v,parentPath:N,objects:[,_]}of E)if(typeof v!="symbol"){let O=f.formMeta,R=g;if(O){for(const B of N)O=O.fields[B],R=R[B],D.has(O)||O.validate(R);if(I===T.DiffChange.ADDITION||I===T.DiffChange.ALTERATION){const B=O.fields[v];if(!D.has(B)&&(O.fields[v].validate(_[v]),I===T.DiffChange.ADDITION&&B.fields))for(const[F,P]of Object.entries(B.fields))P.validate(_[v][F])}}}}}return{formValue:g||f.formValue,formMeta:f.formMeta,updateForm:f.updateForm}},[]),[c,l]=$.useReducer(i,{formValue:e,formMeta:n,updateForm:u});function p(f,m,g=!1,S){f?l({path:f,value:m,markAsBlurred:g,newValidators:S}):u()}function u(f,m){if(f||m){s.current&&window.clearTimeout(s.current);const g=window.setTimeout(l,0,{value:f,updateFormOptions:m});s.current=g}else if(!s.current){const g=window.setTimeout(l,0,{});s.current=g}}return $.useEffect(()=>()=>{s.current&&window.clearTimeout(s.current)},[]),c}const Lb=H(k({},Y),{focusInputOnClick:y.exports.bool,formMeta:ce(),formControl:ce(),inputRef:Ft()}),it=a.forwardRef((e,t)=>{const I=e,{className:n,children:s,focusInputOnClick:o,formControl:i,formMeta:c,inputRef:l,onClick:p}=I,u=z(I,["className","children","focusInputOnClick","formControl","formMeta","inputRef","onClick"]),f=a.useRef(),g=l||(t||f);function S(){g&&g!==t&&g.current&&g.current.focus()}function w(){g&&g!==t&&g.current&&c&&c instanceof En&&c.markAsFocused()}function x(){g&&g!==t&&g.current&&c&&c instanceof En&&c.markAsBlurred()}const E=K("sps-form-group",(i&&i.isRequired()||c&&c.isRequired())&&"sps-form-group--required",(i&&!i.isValid()||c&&c.isVisibilyInvalid())&&"sps-form-group--error",c&&c.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function D(v){o&&S(),p&&p(v)}return a.useEffect(()=>{function v(N){N.target.classList.contains("sps-form-control__clear-btn")&&N.preventDefault()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[]),a.createElement("div",H(k({},u),{className:E,ref:t,tabIndex:-1,onClick:D,onFocus:w,onBlur:x}),s)});Object.assign(it,{spsFormComponentWrapperPropTypes:Lb,displayName:"SpsFormComponentWrapper"});function Sc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function bc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Jr(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return bc(n.overflowY,t)||bc(n.overflowX,t)||function(s){var o=function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}}(s);return!!o&&(o.clientHeight<s.scrollHeight||o.clientWidth<s.scrollWidth)}(e)}return!1}function ps(e,t,n,s,o,i,c,l){return i<e&&c>t||i>e&&c<t?0:i<=e&&l<=n||c>=t&&l>=n?i-e-s:c>t&&l<n||i<e&&l>n?c-t+o:0}function vc(e,t){var n=window,s=t.scrollMode,o=t.block,i=t.inline,c=t.boundary,l=t.skipOverflowHiddenElements,p=typeof c=="function"?c:function(Ke){return Ke!==c};if(!Sc(e))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,f=[],m=e;Sc(m)&&p(m);){if((m=m.parentElement)===u){f.push(m);break}m!=null&&m===document.body&&Jr(m)&&!Jr(document.documentElement)||m!=null&&Jr(m,l)&&f.push(m)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,S=n.visualViewport?n.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,E=e.getBoundingClientRect(),D=E.height,I=E.width,v=E.top,N=E.right,_=E.bottom,O=E.left,R=o==="start"||o==="nearest"?v:o==="end"?_:v+D/2,B=i==="center"?O+I/2:i==="end"?N:O,F=[],P=0;P<f.length;P++){var U=f[P],V=U.getBoundingClientRect(),W=V.height,pe=V.width,me=V.top,re=V.right,se=V.bottom,j=V.left;if(s==="if-needed"&&v>=0&&O>=0&&_<=S&&N<=g&&v>=me&&_<=se&&O>=j&&N<=re)return F;var Z=getComputedStyle(U),oe=parseInt(Z.borderLeftWidth,10),ee=parseInt(Z.borderTopWidth,10),te=parseInt(Z.borderRightWidth,10),X=parseInt(Z.borderBottomWidth,10),le=0,q=0,ye="offsetWidth"in U?U.offsetWidth-U.clientWidth-oe-te:0,Ie="offsetHeight"in U?U.offsetHeight-U.clientHeight-ee-X:0;if(u===U)le=o==="start"?R:o==="end"?R-S:o==="nearest"?ps(x,x+S,S,ee,X,x+R,x+R+D,D):R-S/2,q=i==="start"?B:i==="center"?B-g/2:i==="end"?B-g:ps(w,w+g,g,oe,te,w+B,w+B+I,I),le=Math.max(0,le+x),q=Math.max(0,q+w);else{le=o==="start"?R-me-ee:o==="end"?R-se+X+Ie:o==="nearest"?ps(me,se,W,ee,X+Ie,R,R+D,D):R-(me+W/2)+Ie/2,q=i==="start"?B-j-oe:i==="center"?B-(j+pe/2)+ye/2:i==="end"?B-re+te+ye:ps(j,re,pe,oe,te+ye,B,B+I,I);var Ce=U.scrollLeft,we=U.scrollTop;R+=we-(le=Math.max(0,Math.min(we+le,U.scrollHeight-W+Ie))),B+=Ce-(q=Math.max(0,Math.min(Ce+q,U.scrollWidth-pe+ye)))}F.push({el:U,top:le,left:q})}return F}function yc(e){return e===Object(e)&&Object.keys(e).length!==0}function Ob(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(s){var o=s.el,i=s.top,c=s.left;o.scroll&&n?o.scroll({top:i,left:c,behavior:t}):(o.scrollTop=i,o.scrollLeft=c)})}function Bb(e){return e===!1?{block:"end",inline:"nearest"}:yc(e)?e:{block:"start",inline:"nearest"}}function Tc(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(yc(t)&&typeof t.behavior=="function")return t.behavior(n?[]:vc(e,t));if(!n){var s=Bb(t);return Ob(vc(e,s),s.behavior)}}var Ab=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Tc});const Pb={alt:"string",size:"SpinnerSize",title:"string"},Fb=H(k({},Y),{alt:y.exports.string,size:be(M.SpinnerSize),title:y.exports.string});function us(e){const m=e,{alt:t,className:n,size:s=M.SpinnerSize.MEDIUM,"data-testid":o,title:i,unsafelyReplaceClassName:c}=m,l=z(m,["alt","className","size","data-testid","title","unsafelyReplaceClassName"]),{t:p}=a.useContext(Oe),u=t||i||p("design-system:spinner.defaultAltText"),f=K(c||"sps-spinner",`sps-spinner--${s}`,n);return a.createElement("i",k({className:f,"data-testid":o,title:u},l))}Object.assign(us,{props:Pb,propTypes:Fb,displayName:"SpsSpinner"});const Kb=60;function ms(e){return typeof e=="undefined"?"inherit":`${e}px`}function wc(e){switch(e){case M.Position.TOP_LEFT:return M.Position.BOTTOM_LEFT;case M.Position.TOP_MIDDLE:return M.Position.BOTTOM_MIDDLE;case M.Position.TOP_RIGHT:return M.Position.BOTTOM_RIGHT;case M.Position.RIGHT_TOP:return M.Position.LEFT_TOP;case M.Position.RIGHT_MIDDLE:return M.Position.LEFT_MIDDLE;case M.Position.RIGHT_BOTTOM:return M.Position.LEFT_BOTTOM;case M.Position.BOTTOM_RIGHT:return M.Position.TOP_RIGHT;case M.Position.BOTTOM_MIDDLE:return M.Position.TOP_MIDDLE;case M.Position.BOTTOM_LEFT:return M.Position.TOP_LEFT;case M.Position.LEFT_BOTTOM:return M.Position.RIGHT_BOTTOM;case M.Position.LEFT_MIDDLE:return M.Position.RIGHT_MIDDLE;case M.Position.LEFT_TOP:return M.Position.RIGHT_TOP}}function Vb(e,t,n,s,o,i,c,l){const p=c&&c.current,u=p?p.scrollTop:window.pageYOffset,f=l?0:u,m=p?p.scrollLeft:window.pageXOffset,g=l?0:m,[S,w]=e.split(" ");let x,E,D,I;switch(S){case"top":D=t.height-n.top-f-i[0];break;case"left":E=t.width-n.left-g-i[0];break;case"right":I=n.right+g-i[0];break;case"bottom":x=n.bottom+f-i[0];break;default:throw new Error(`Invalid position ${e}`)}switch(w){case"left":I=n.left+g+i[1];break;case"top":x=n.top+f+i[1];break;case"middle":S==="top"||S==="bottom"?I=n.left+g+n.width/2-o/2+i[1]:(S==="left"||S==="right")&&(x=n.top+f+n.height/2-s.height/2+i[1]);break;case"bottom":D=t.height-n.bottom-f+i[1];break;case"right":E=t.width-n.right-g+i[1];break;default:throw new Error(`Invalid position ${e}`)}return[x,E,D,I]}function Cn(e,t,n,{altPosition:s,setMinWidth:o=!1,setWidth:i=!1,parentElementRef:c,fixed:l=!1,offsets:p=[0,0]}){if(e.current&&t.current){const u=Math.max(document.documentElement.clientHeight,window.innerHeight||0),f=document.documentElement.getBoundingClientRect().width,m=c&&c.current?c.current:document.documentElement,g=l?{width:f,height:u,top:0,left:0,bottom:u,right:f}:m.getBoundingClientRect(),S=e.current.getBoundingClientRect(),w=t.current.getBoundingClientRect(),[x]=n.split(" ");let E=n;s&&(x==="top"&&w.top-S.height<Kb||x==="right"&&w.right+S.width>f||x==="bottom"&&w.bottom+S.height>u||x==="left"&&w.left-S.width<0)&&(E=s);const D=o?Math.max(w.width,S.width):S.width,I=i?w.width:D,[v,N,_,O]=Vb(E,g,w,S,I,p,c,l),R={top:ms(v),right:ms(N),bottom:ms(_),left:ms(O)};return l&&(R.position="fixed",R.zIndex=M.ZStratum.BAR),o&&(R.minWidth=`${w.width}px`),i&&(R.width=`${w.width}px`),[R,E===s]}return[{},!1]}const Mt=$.createContext(null);function zn(e,t=[]){const n=$.useContext(Mt);return $.useMemo(()=>s=>{const i=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let c,l=i.lastElementChild;for(;l!==i.firstElementChild;){if(l.hasAttribute("data-portalid")&&l.getAttribute("data-portalid")===e){c=l;break}l=l.previousElementSibling}if(c)i.contains(c)||i.appendChild(c);else{c=document.createElement("div"),c.setAttribute("data-portalid",e);for(const p of t)c.classList.add(p);i.appendChild(c)}return Hr.createPortal(s,c)},[n])}const $b={docs:{options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",captionKey:"string",disabledOptions:"any[]",comparisonKey:"string",tall:"boolean",textKey:"string",valueKey:"string",zeroState:"string",maxHeightPx:"number",maxHeightRem:"number",disableOptionsMemoization:"boolean",onSpecialActionSelect:"() => void"},propTypes:{captionKey:y.exports.string,comparisonKey:y.exports.string,disabledOptions:y.exports.arrayOf(y.exports.any),options:y.exports.oneOfType([y.exports.array,y.exports.instanceOf(Promise),ne()]).isRequired,tall:y.exports.bool,textKey:y.exports.string,valueKey:y.exports.string,zeroState:y.exports.string,maxHeightPx:y.exports.number,maxHeightRem:y.exports.number}},Hb={hideInlineSearch:y.exports.bool,onSearchChange:ne(),search:y.exports.string,searchDebounce:y.exports.number,searchPlaceholder:y.exports.string,searchInputRef:Ft(),onSpecialActionSelect:ne()},Wb=H(k(k(k({},Y),$b.propTypes),Hb),{attachTo:Ft().isRequired,conformWidth:y.exports.bool,id:y.exports.string.isRequired,isOpen:y.exports.bool,keepOpen:y.exports.bool,keyDown:ce(),nullOption:y.exports.string,offsets:y.exports.arrayOf(y.exports.number),onOptionListChanged:ne(),onOptionSelected:ne(),onPositionFlip:ne(),onSelfToggle:ne(),optionRole:y.exports.string,positionOverride:y.exports.arrayOf(be(M.Position)),selectedOption:y.exports.any,specialAction:ne(),ignoreWidthStyles:y.exports.bool,loading:y.exports.bool,filterByTextAndCaptionKey:y.exports.bool,disableOptionsMemoization:y.exports.bool});async function Ec(e,t,n,s,o,i){const c=typeof e.options=="function"?e.options(t.value):e.options||[],l=c instanceof Promise,p=m=>m.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:l}),i.current=l?c:null;const u=l?await c||[]:c||[];if(l&&i.current!==c)return;let f=Array.from(u).filter(Boolean).map(m=>new M.SpsOptionListOption(m,typeof m=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&f.unshift(new M.SpsOptionListOption(null,{text:e.nullOption})),t.value){const m=p(t.value);n({replacementPattern:new RegExp(m,"ig")}),f=f.filter(g=>{const S=new RegExp(m,"i"),w=p(g.text);return e.filterByTextAndCaptionKey?S.test(w)||S.test(p(g.caption)):S.test(w)})}else n({replacementPattern:null});if(e.disabledOptions)for(const m of f)e.disabledOptions.includes(m.value)&&(m.disabled=!0);s(Object.freeze(f)),e.onOptionListChanged&&e.onOptionListChanged(f.length),o(f.some(m=>m.value&&!!m.value.icon)),n({pending:!1})}function Gb(e,t,n){const[s,o]=a.useState(Object.freeze([])),[i,c]=a.useState(!1),l=a.useRef(null),p=a.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const u=a.useMemo(()=>typeof p.current=="function"?T.debounce(Ec,typeof e.searchDebounce!="undefined"?e.searchDebounce:500):Ec,[p.current,e.disabledOptions]);return a.useEffect(()=>{u(e,t,n,o,c,l)},[p.current,t.value,e.disabledOptions]),[s,i]}class on{constructor(t,n){this.target=t,this.isPgStoppedInternal=!1,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 Ub(e,t){return k(k({},e),t)}function Kt(e){return $.useReducer(Ub,e)}function Yb({hideInlineSearch:e,options:t,onSearchChange:n,search:s="",searchPlaceholder:o="Search\u2026",searchInputRef:i}){const[c,l]=Kt({isAsync:typeof t=="function",pending:!1,value:s,replacementPattern:null}),p=a.useCallback(S=>{l({value:S.target.value}),n&&n(S)},[n]),u=a.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),S.stopPropagation()},[]),f=a.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),l({value:""}),n&&n(new on(i.current)),i.current&&i.current.focus()},[n]),m=S=>{!S||["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(S.key)||S.stopPropagation()};return a.useEffect(()=>{l({value:s})},[s]),[c.isAsync&&!e&&a.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},a.createElement("div",{className:"sps-form-control"},!c.value&&a.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),a.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:o,ref:i,value:c.value,onChange:p,onClick:u,onKeyDown:m}),c.value&&a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:f}))),c,l]}const zb=Tc||Ab,jb=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"],qb=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Jb(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function Cc(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e==null?void 0:e.find(s=>{var o;return s[t]&&s[t]===((o=n==null?void 0:n.value)==null?void 0:o[t])})):!1}const ya=a.forwardRef((e,t)=>{const An=e,{captionKey:n,comparisonKey:s,disabledOptions:o,options:i,tall:c,textKey:l,valueKey:p,zeroState:u,hideInlineSearch:f,onSearchChange:m,search:g,searchDebounce:S,searchPlaceholder:w,onSpecialActionSelect:x,attachTo:E,className:D,conformWidth:I,id:v,ignoreWidthStyles:N,isOpen:_,keepOpen:O,keyDown:R,nullOption:B,onOptionListChanged:F,onOptionSelected:P,onPositionFlip:U,onSelfToggle:V,optionRole:W,positionOverride:pe,selectedOption:me,specialAction:re,unsafelyReplaceClassName:se,loading:j,filterByTextAndCaptionKey:Z,maxHeightPx:oe,maxHeightRem:ee,disableOptionsMemoization:te,"data-testid":X}=An,le=z(An,["captionKey","comparisonKey","disabledOptions","options","tall","textKey","valueKey","zeroState","hideInlineSearch","onSearchChange","search","searchDebounce","searchPlaceholder","onSpecialActionSelect","attachTo","className","conformWidth","id","ignoreWidthStyles","isOpen","keepOpen","keyDown","nullOption","onOptionListChanged","onOptionSelected","onPositionFlip","onSelfToggle","optionRole","positionOverride","selectedOption","specialAction","unsafelyReplaceClassName","loading","filterByTextAndCaptionKey","maxHeightPx","maxHeightRem","disableOptionsMemoization","data-testid"]),q=a.useMemo(()=>re?new M.SpsOptionListOption(re,{textKey:"label",captionKey:"caption"}):null,[re]),[ye,Ie]=a.useState(-1),[Ce,we]=a.useState(_),Ke=t||a.useRef(null),$e=a.useRef(null),je=a.useRef(null),et=zn("sps-option-list-portal"),qe=a.useContext(Mt),[ut,ct]=pe||[M.Position.BOTTOM_LEFT,M.Position.TOP_LEFT],[[vt,Ee],We]=a.useState([{},!1]);a.useEffect(()=>{We(Ce?Cn(Ke,E,ut,k({altPosition:ct,setMinWidth:!N,setWidth:!N&&I},qe)):[{},!1])},[Ce,ut,ct]),a.useEffect(()=>{const ve=()=>{Ce&&We(Cn(Ke,E,ut,k({altPosition:ct,setMinWidth:!N,setWidth:!N&&I},qe)))};return document.addEventListener("scroll",ve),()=>{document.removeEventListener("scroll",ve)}},[Ce]);const Ye=a.useRef(null),[Ve,Se,He]=Yb(H(k({},e),{searchInputRef:Ye})),[Ae,Ge]=Gb(e,Se,He);a.useEffect(()=>{Ie(-1)},[Se]);const Tr=K(se||"sps-option-list","z-stratum-dropdown",Ce&&"sps-option-list--open",Se.isAsync&&"sps-option-list--searchable",Ee&&"sps-option-list--opens-upward",re&&re.label&&"sps-option-list--has-special-action",D),On=K(se||"sps-option-list__options",c&&"sps-option-list__options--tall"),tt=a.useCallback(()=>{Ce||(we(!0),Ye.current&&Ye.current.focus(),Ie(-1),V&&V(!0))},[Ce,V]),Te=a.useCallback(()=>{Ce&&(we(!1),Ie(-1),V&&V(!1))},[Ce,V]),yt=a.useCallback((ve,de)=>{de||ve&&!ve.disabled&&(typeof ve.value=="function"?(ve.value(),x&&x()):typeof P=="function"&&P(ve.value),O||Te())},[P,Te]),gn=a.useCallback((ve,de,ot)=>{ve.stopPropagation(),yt(de,ot)},[yt]),Bn=a.useRef(o||[]);Bn.current=o||[];const wr=a.useCallback(ve=>{switch(ve.key){case"Tab":case"Escape":Te();break;case"Enter":if(ye>-1){const de=Ae[ye]||q;ve.preventDefault();const ot=!!de&&Cc(Bn.current,s,de);!ot&&de&&typeof P=="function"&&typeof de.value=="function"?de.value():de&&yt(de,ot)}break;case"Up":case"ArrowUp":{let de=ye;Ee?ye<=-1?de=Ae.length-1:ye===0?re&&(de=Ae.length):ye<Ae.length&&(de=ye-1):ye>-1&&(de=ye-1),de!==ye&&(ve.preventDefault(),Ie(de));break}case"Down":case"ArrowDown":{tt();let de=ye;Ee?ye!==-1&&(ye>=Ae.length?de=0:ye===Ae.length-1?de=-1:de=ye+1):ye<Ae.length-1+Number(!!re)&&(de=ye+1),de!==ye&&(ve.preventDefault(),Ie(de));break}default:tt()}},[Te,tt,ye,yt,P,Ee,Ae]),Er=a.useCallback(ve=>{const de=Ae.findIndex(ot=>{if(ot.textKey){const Sn=ot.textKey;return ot.value[Sn].toLowerCase().charAt([0])===ve.key.toLocaleLowerCase()}return ot.value.toString().toLowerCase().charAt([0])===ve.key.toLocaleLowerCase()});de>-1&&Ie(de)},[Ae]),$a=a.useCallback(ve=>{!ve||(jb.includes(ve.key)?wr(ve):qb.includes(ve.key)&&Er(ve))},[Te,tt,ye,yt,P,Ee,Ae]);a.useEffect(()=>{if(qe!==null&&document.getElementsByClassName("sps-modal__body").length>0){const ve=()=>{V(!1)},de=document.getElementsByClassName("sps-modal__body")[0];return de.addEventListener("scroll",ve),()=>{de.removeEventListener("scroll",ve)}}},[]),a.useEffect(()=>{je.current&&zb(je.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[ye]),a.useEffect(()=>{we(_),_?Ye.current&&Ye.current.focus():Ie(-1)},[_]),a.useEffect(()=>{$a(R)},[R]),a.useEffect(()=>{!Ce&&$e.current&&(He({value:""}),$e.current.scrollTop=0),Ce&&U&&U(Ee)},[Ce]);const at=oe?oe/16:ee,Ha=at?{maxHeight:`${at}rem`}:{};return et(a.createElement("div",k({className:Tr,id:v,"aria-activedescendant":ye>-1?`${v}-option-${ye}`:null,tabIndex:-1,ref:Ke,style:vt,onMouseLeave:()=>Ie(-1),"data-testid":X},le),Ve,a.createElement("div",{className:On,ref:$e,"data-testid":`${X}-options`,style:Ha},!j&&!Se.pending&&u&&Ae.length===0&&a.createElement("div",{className:"sps-option-list__zero-state"},u),(j||Se.pending)&&a.createElement("div",{className:"sps-option-list__loading"},a.createElement(us,null)),!j&&!Se.pending&&Ae.map((ve,de)=>{const ot=`${v}-option-${de}`,Sn=Jb(ve.value,me,s),bn=Cc(Bn.current,s,ve);return a.createElement("a",{key:ot,id:ot,role:W,"aria-selected":Sn,href:ve.href,className:K("sps-option-list__option",ve.caption&&"sps-option-list__option--has-caption",ve.disabled&&"sps-option-list__option--disabled",ve.bold&&"sps-option-list__option--bold",(Sn||bn)&&"sps-option-list__option--selected",ye===de&&"sps-option-list__option--highlighted"),onClick:ia=>gn(ia,ve,bn),onMouseOver:()=>Ie(de),tabIndex:-1,ref:ye===de?je:null,"data-testid":`${X}-option-${de}`},ve.value&&ve.value.icon&&a.createElement("i",{className:K("sps-icon","sps-option-list__option-icon",`sps-icon-${String(ve.value.icon)}`)}),(!ve.value||!ve.value.icon&&Ge)&&a.createElement("span",{className:"sps-option-list__option-icon-spacer"}),a.createElement("span",{dangerouslySetInnerHTML:{__html:ve.getHtml(Se.replacementPattern)}}),ve.caption&&a.createElement("div",{className:"sps-option-list__option-caption"},a.createElement("span",{dangerouslySetInnerHTML:{__html:ve.caption.replace(Se.replacementPattern,"<u>$&</u>")}})))})),q&&re.label&&a.createElement("a",{className:K("sps-option-list__option","sps-option-list__special-action",ye===Ae.length&&"sps-option-list__option--highlighted",re.disabled&&"sps-option-list__special-action--disabled"),href:q.href,target:q.href&&re.newTab?"_blank":"_self",onClick:ve=>gn(ve,q),onMouseOver:()=>Ie(Ae.length),"data-testid":`${X}-special-action`},re.icon&&a.createElement("i",{className:K("sps-icon","sps-option-list__option-icon",`sps-icon-${String(re.icon)}`)}),!re.icon&&Ge&&a.createElement("span",{className:"sps-option-list__option-icon-spacer"}),a.createElement("span",null,re.label))))});Object.assign(ya,{propTypes:Wb,displayName:"SpsOptionList"});function Zb(e,t,n=[]){return a.useMemo(()=>o=>a.createElement(e,k({},k(k({},o),t)),o.children),n)}const xc=function({children:e,elements:t}){if(t.length===0)return a.createElement(a.Fragment,null,e);const[n,s]=Array.isArray(t[0])?t[0]:[t[0]];return a.createElement(n,k({},s!=null?s:{}),a.createElement(xc,{elements:t.slice(1)},e))},Dc=function(s){var o=s,{children:e,providers:t=[]}=o,n=z(o,["children","providers"]);return a.createElement("div",k({},n),a.createElement(xc,{elements:t},e))},Xb=function(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement(Dc,k({className:`sps-app ${t}`},n),e)};function Vt(e=[],t=[]){const n=Array.isArray(e)?T.flatten(e):[e],s=t.map(i=>Array.isArray(i)?i:[i]),o=new Array(s.length+1).fill(null).map(()=>[]);for(const i of n){let c=!1;for(let l=0;l<s.length;l+=1)for(const{type:p,props:u={}}of s[l])if(i.type===p&&Object.keys(u).every(m=>u[m]===i.props[m])){c=!0,o[l].push(i);break}c||o[o.length-1].push(i)}return o}function Ic(e,t,n){const s=Object.entries(t).filter(([,i])=>typeof i!="string"&&i.deprecated).map(([i])=>i),o=s.map(i=>n[i]);a.useEffect(()=>{o.find(i=>typeof i!="undefined")&&console.warn(`The following prop(s) of ${e} are deprecated: ${s.join(", ")}`)},o)}function Zr(e,t){const n=$.useRef(!1);$.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Nc(e,t,n){const s=a.useRef(t(...n));a.useEffect(()=>(document.addEventListener(e,s.current),()=>document.removeEventListener(e,s.current)),[]),a.useEffect(()=>{document.removeEventListener(e,s.current),s.current=t(...n),document.addEventListener(e,s.current)},n)}function Qb(e,t,n){return function(o){var i,c;!((i=e.current)==null?void 0:i.contains(o.target))&&!((c=t.current)==null?void 0:c.contains(o.target))&&n()}}function Ta(e,t,n){const s=a.useRef(!1),[o,i]=a.useState(!1),c=a.useCallback(()=>{s.current?s.current=!1:i(!0)},[]),l=a.useCallback((p=!1)=>{i(!1),s.current=p,n&&n()},[]);return Nc("mousedown",Qb,[e,t,l]),{showPopup:o,doShowPopup:c,doHidePopup:l}}const ev={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",placeholder:"string",suggestions:{type:`
|
|
196
|
+
`}}}};let sn=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function Gn(e){return H.useRef(e||sn())}function Tt(e,t){const n=Gn(e),s=H.useRef(`${n.current}_ctrl`);return H.useEffect(()=>{t&&(t.id=s.current,t.update())},[t]),{wrapperId:n.current,controlId:s.current}}var db="[object Object]";function pb(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function ub(e,t){return function(n){return e(t(n))}}var mb=Function.prototype,oc=Object.prototype,ic=mb.toString,fb=oc.hasOwnProperty,hb=ic.call(Object),gb=oc.toString,Sb=ub(Object.getPrototypeOf,Object);function bb(e){return!!e&&typeof e=="object"}function vb(e){if(!bb(e)||gb.call(e)!=db||pb(e))return!1;var t=Sb(e);if(t===null)return!0;var n=fb.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ic.call(n)==hb}var lc=vb;const kt=new Set,Un=new Set,Xt=new Set,Sa=new Set;function cc(e){kt.has(e)||Xt.has(e)||Sa.has(e)||Un.add(e)}function dc(e){kt.has(e)||Xt.has(e)||Un.has(e)||Sa.add(e)}const Yr=Wn.default||Wn,os="MM/DD/YYYY",yb=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,pc=Symbol("Date Parse Error");function Yn(e){return e.year*1e4+e.month*100+e.date}const he=Object.freeze({createFrom(e){if(!e)return null;if(typeof e=="string"){const t=yb.exec(e);if(t){const[,n,s,o]=t;return Object.freeze({year:Number(o),month:Number(n),date:Number(s)})}return Object.freeze({[pc]:!0,year:void 0,month:void 0,date:void 0})}return Object.freeze({year:e.year(),month:e.month()+1,date:e.date()})},createRangeFrom(e){return e?e.split(/[^\d]*-[^\d]*/).map(he.createFrom):null},isValid(e){return e&&typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&he.toMoment(e).isValid()},nullifyInvalidDate(e){return he.isValid(e)?e:null},toMoment(e){return e?Yr(G(N({},e),{month:e.month-1})):null},toString(e){const t=he.toMoment(e);return t?t.format(os):""},toStringRange(e){return e?e.map(he.toString).join("-"):""},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:Yn(e)>Yn(t)},isBefore(e,t){return!e||!t?null:Yn(e)<Yn(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const s=Yn(e),[o,i]=t.map(Yn);return e&&o&&i&&(n&&s>=o&&s<=i||!n&&s>o&&s<i)},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){if(typeof e.definition=="function")return e.definition();const t=Yr(),n=t.clone().subtract(Yr.duration(e.definition));return[he.createFrom(n),he.createFrom(t)]}}),ba=function(t){if(Array.isArray(t)){const n=ba(t[0]),s=ba(t[1]);return n||s}if(t&&t.hasOwnProperty("year")){if(t[pc])return{dateFormat:os};if(!he.isValid(t))return{dateValidity:!0}}return null};kt.add("dateFormat");kt.add("dateValidity");const uc=function(t){if(Array.isArray(t)){const n=ba(t);if(n)return n;if(t&&he.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};kt.add("dateRangeOrder");const mc=function({minDate:t,maxDate:n}){function s(o){const i=he.isBefore(o,t),c=he.isAfter(o,n),l={minExceeded:i?he.toString(t):null,maxExceeded:c?he.toString(n):null};return i||c?{dateConstraint:l}:null}return function(i){if(!i)return null;if(Array.isArray(i)){const c=s(i[0]),l=s(i[1]);return c||l}return i.hasOwnProperty("year")?s(i):null}};kt.add("dateConstraint");var Tb=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",date:ba,dateRange:uc,dateConstraint:mc});function rn(e,t){for(const n of[].concat(e)){const s=t(n);if(s)return s}return null}const wb=function(t){function n(s){return Number(s)>=t?null:{min:t}}return s=>rn(s,n)};kt.add("min");const Eb=function(t){function n(s){return Number(s)<=t?null:{max:t}}return s=>rn(s,n)};Un.add("max");const Cb=function(t){return typeof t=="undefined"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};Un.add("required");const xb=function(t){function n(s){return s.length>=t?null:{minLength:t}}return s=>rn(s,n)};kt.add("minLength");const Db=function(t){function n(s){return s.length<=t?null:{maxLength:t}}return s=>rn(s,n)};Xt.add("maxLength");const Ib=function(t){const n=t instanceof RegExp?t:new RegExp(t);function s(o){return n.test(o)?null:{pattern:t}}return o=>rn(o,s)};kt.add("pattern");const Nb=function(e){function t(n){return/^\p{L}*$/u.test(n)?null:{alpha:!0}}return rn(e,t)};Xt.add("alpha");const kb=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return rn(e,t)};Xt.add("numeric");const Mb=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return rn(e,t)};Xt.add("nonNumeric");const is=Object.freeze(G(N({},Tb),{min:wb,max:Eb,required:Cb,minLength:xb,maxLength:Db,pattern:Ib,alpha:Nb,numeric:kb,nonNumeric:Mb,OnBlurErrorKeys:kt}));function va(e,t=[]){const n=t.reduce((s,o)=>Object.assign(s,o(e)||{}),{});return Object.keys(n).length?n:null}class wn{constructor(t,n){this.path=t,this.update=n,this.validators=[],this.errors=null,this.revealAllErrors=!1,this.preventativeErrors=[],this.submitted=!1}setValidators(t){return this.update(this.path,null,null,t),this}validate(t){return this.validators&&this.validators.length>0?(this.errors=va(t,this.validators),this.update(null),this.isFocused()&&this.onFocus&&this.onFocus()):this.errors&&(this.errors=null,this.update(null)),this}isValid(){return!this.errors||this.isPristine()}hasErrors(){return!!this.errors}isVisibilyInvalid(){return this.errors&&(this.revealAllErrors&&!Object.keys(this.errors).some(t=>Sa.has(t))||this.revealAllErrors&&Object.keys(this.errors).some(t=>Sa.has(t))&&this.isSubmitted()||!this.isPristine()&&Object.keys(this.errors).some(t=>Un.has(t)))}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(is.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}class En extends wn{constructor(){super(...arguments);this.id=sn(),this.focused=!1,this.pristine=!0}setValue(t){if(this.revealAllErrors=!1,this.preventativeErrors=[],this.validators&&this.validators.length>0){const n=va(t,this.validators);if(n&&Object.keys(n).filter(o=>Xt.has(o)).length>0){this.preventativeErrors=Object.keys(n);return}}this.update(this.path,t)}isPristine(){return this.pristine}markAsPristine(){return this.pristine=!0,this.revealAllErrors=!1,this.update(null),this}markAsDirty(){return this.pristine=!1,this.update(null),this}isFocused(){return this.focused}markAsFocused(){return this.focused=!0,this.update(null),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(null),this}}class ls extends En{constructor(t,n,s){const o=s?n:t,i=s||n;super(o,i);s&&this.inferMembers(t)}inferSpsControl(t,n){return cs(t,[...this.path,n],this.update)}rollup(t){return Object.keys(this.fields).reduce((n,s)=>n&&(!this.fields[s][t]||this.fields[s][t]()),!0)}isFocused(){return super.isFocused()||this.rollup("isFocused")}isValid(){return super.isValid()&&this.rollup("isValid")}hasErrors(){return super.hasErrors()||Object.keys(this.fields).some(t=>this.fields[t].hasErrors())}contentsAreValid(){return this.rollup("isValid")&&this.rollup("contentsAreValid")}isPristine(){return super.isPristine()&&this.rollup("isPristine")}markAsPristine(){super.markAsPristine();for(const t of Object.keys(this.fields))this.fields[t].markAsPristine();return this}markAsDirty(){super.markAsDirty();for(const t of Object.keys(this.fields))this.fields[t].markAsDirty();return this}markAsBlurred(){super.markAsBlurred();for(const t of Object.keys(this.fields))this.fields[t].markAsBlurred();return this}markAsSubmitted(){super.markAsSubmitted();for(const t of Object.keys(this.fields))this.fields[t].markAsSubmitted();return this}}class fc extends ls{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class hc extends ls{inferMembers(t){this.fields=t.map((n,s)=>this.inferSpsControl(n,String(s)))}}function cs(e,t,n){return e instanceof wn?(e.path=t,e.update=n,e):Array.isArray(e)?new hc(e,t,n):lc(e)?new fc(e,t,n):new En(t,n)}function zr(e,t){return t.length===0||!e?e:zr(e.fields[t[0]],t.slice(1,t.length))}function jr(e,t){if(t.length===0||!e)return[e];const n=t[0];if(t=t.slice(1,t.length),n==="*"){const s=Array.isArray(e.fields)?e.fields:Object.keys(e.fields).map(o=>e.fields[o]);return t.length===0?s:s.reduce((o,i)=>[...o,...jr(i,t)],[])}return jr(e.fields[n],t)}function gc(e,t,n){for(const s of Object.keys(t)){const o=t[s];for(const i of jr(e,s.split(".")))i&&o&&n(i,o)}}function ds(e,t,n,s=!1){gc(t,n,(o,i)=>{o.validators=typeof i=="function"?i(e):i,s&&(o.errors=va(T.getPath(e,o.path),o.validators))})}function qr(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((s,o)=>o===Number(n)?qr(s,t):s):lc(e)?Object.keys(e).reduce((s,o)=>Object.assign(s,{[o]:o===n?qr(e[o],t):e[o]}),{}):e}function _b(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function Rb(e,t){_b(e);const n=H.useMemo(()=>{T.deepFreeze(e);const f=cs(e,[],p);return t&&ds(e,f,t,!0),f},[]),s=H.useRef(),o=H.useRef(t),i=H.useCallback((f,m)=>{var S,w,x;let g;if(s.current=null,m)if(m.path)if(m.markAsBlurred){const C=zr(f.formMeta,m.path);C&&(C.focused=!1,C.revealAllErrors=!0)}else if(m.newValidators){if(o.current){const C=m.path.join(".");o.current=G(N({},o.current),{[C]:m.newValidators}),ds(f.formValue,f.formMeta,o.current,!0)}}else g=qr(f.formValue,m.path),T.setPath(g,m.path,m.value);else g=m.value;if(((S=m.updateFormOptions)==null?void 0:S.validators)&&(o.current=N(N({},o.current),m.updateFormOptions.validators),ds(f.formValue,f.formMeta,o.current,(x=(w=m.updateFormOptions)==null?void 0:w.runValidators)!=null?x:!0)),g){T.deepFreeze(g);const C=T.diff(f.formValue,g);for(const{type:D,key:I,parentPath:v,objects:[k,R]}of C){const B=zr(f.formMeta,v);if(typeof I!="symbol"&&B)switch(D){case T.DiffChange.ADDITION:B.fields[I]=cs(R[I],[...v,I],p);break;case T.DiffChange.DELETION:Array.isArray(B.fields)?B.fields.splice(Number(I),1):delete B.fields[I];break;case T.DiffChange.ALTERATION:if(!k[I]&&R[I]&&!(B.fields[I]instanceof ls)){const M=cs(R[I],[...v,I],p);M instanceof En&&B.fields[I]instanceof En&&(M.id=B.fields[I].id,M.focused=B.fields[I].focused,M.pristine=B.fields[I].pristine),B.fields[I]=M}break}}if(o.current){ds(g,f.formMeta,o.current);const D=new Set;gc(f.formMeta,t,(I,v)=>{typeof v=="function"&&(I.validate(T.getPath(g,I.path)),D.add(I))});for(const{type:I,key:v,parentPath:k,objects:[,R]}of C)if(typeof v!="symbol"){let B=f.formMeta,M=g;if(B){for(const L of k)B=B.fields[L],M=M[L],D.has(B)||B.validate(M);if(I===T.DiffChange.ADDITION||I===T.DiffChange.ALTERATION){const L=B.fields[v];if(!D.has(L)&&(B.fields[v].validate(R[v]),I===T.DiffChange.ADDITION&&L.fields))for(const[F,A]of Object.entries(L.fields))A.validate(R[v][F])}}}}}return{formValue:g||f.formValue,formMeta:f.formMeta,updateForm:f.updateForm}},[]),[c,l]=H.useReducer(i,{formValue:e,formMeta:n,updateForm:u});function p(f,m,g=!1,S){f?l({path:f,value:m,markAsBlurred:g,newValidators:S}):u()}function u(f,m){if(f||m){s.current&&window.clearTimeout(s.current);const g=window.setTimeout(l,0,{value:f,updateFormOptions:m});s.current=g}else if(!s.current){const g=window.setTimeout(l,0,{});s.current=g}}return H.useEffect(()=>()=>{s.current&&window.clearTimeout(s.current)},[]),c}const Lb=G(N({},Y),{focusInputOnClick:y.exports.bool,formMeta:ce(),formControl:ce(),inputRef:Ft()}),it=a.forwardRef((e,t)=>{const I=e,{className:n,children:s,focusInputOnClick:o,formControl:i,formMeta:c,inputRef:l,onClick:p}=I,u=z(I,["className","children","focusInputOnClick","formControl","formMeta","inputRef","onClick"]),f=a.useRef(),g=l||(t||f);function S(){g&&g!==t&&g.current&&g.current.focus()}function w(){g&&g!==t&&g.current&&c&&c instanceof En&&c.markAsFocused()}function x(){g&&g!==t&&g.current&&c&&c instanceof En&&c.markAsBlurred()}const C=K("sps-form-group",(i&&i.isRequired()||c&&c.isRequired())&&"sps-form-group--required",(i&&!i.isValid()||c&&c.isVisibilyInvalid())&&"sps-form-group--error",c&&c.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function D(v){o&&S(),p&&p(v)}return a.useEffect(()=>{function v(k){k.target.classList.contains("sps-form-control__clear-btn")&&k.preventDefault()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[]),a.createElement("div",G(N({},u),{className:C,ref:t,tabIndex:-1,onClick:D,onFocus:w,onBlur:x}),s)});Object.assign(it,{spsFormComponentWrapperPropTypes:Lb,displayName:"SpsFormComponentWrapper"});function Sc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function bc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Jr(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return bc(n.overflowY,t)||bc(n.overflowX,t)||function(s){var o=function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}}(s);return!!o&&(o.clientHeight<s.scrollHeight||o.clientWidth<s.scrollWidth)}(e)}return!1}function ps(e,t,n,s,o,i,c,l){return i<e&&c>t||i>e&&c<t?0:i<=e&&l<=n||c>=t&&l>=n?i-e-s:c>t&&l<n||i<e&&l>n?c-t+o:0}function vc(e,t){var n=window,s=t.scrollMode,o=t.block,i=t.inline,c=t.boundary,l=t.skipOverflowHiddenElements,p=typeof c=="function"?c:function(Ke){return Ke!==c};if(!Sc(e))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,f=[],m=e;Sc(m)&&p(m);){if((m=m.parentElement)===u){f.push(m);break}m!=null&&m===document.body&&Jr(m)&&!Jr(document.documentElement)||m!=null&&Jr(m,l)&&f.push(m)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,S=n.visualViewport?n.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,C=e.getBoundingClientRect(),D=C.height,I=C.width,v=C.top,k=C.right,R=C.bottom,B=C.left,M=o==="start"||o==="nearest"?v:o==="end"?R:v+D/2,L=i==="center"?B+I/2:i==="end"?k:B,F=[],A=0;A<f.length;A++){var $=f[A],V=$.getBoundingClientRect(),W=V.height,pe=V.width,me=V.top,re=V.right,se=V.bottom,j=V.left;if(s==="if-needed"&&v>=0&&B>=0&&R<=S&&k<=g&&v>=me&&R<=se&&B>=j&&k<=re)return F;var Z=getComputedStyle($),oe=parseInt(Z.borderLeftWidth,10),ee=parseInt(Z.borderTopWidth,10),te=parseInt(Z.borderRightWidth,10),X=parseInt(Z.borderBottomWidth,10),le=0,q=0,ye="offsetWidth"in $?$.offsetWidth-$.clientWidth-oe-te:0,Ie="offsetHeight"in $?$.offsetHeight-$.clientHeight-ee-X:0;if(u===$)le=o==="start"?M:o==="end"?M-S:o==="nearest"?ps(x,x+S,S,ee,X,x+M,x+M+D,D):M-S/2,q=i==="start"?L:i==="center"?L-g/2:i==="end"?L-g:ps(w,w+g,g,oe,te,w+L,w+L+I,I),le=Math.max(0,le+x),q=Math.max(0,q+w);else{le=o==="start"?M-me-ee:o==="end"?M-se+X+Ie:o==="nearest"?ps(me,se,W,ee,X+Ie,M,M+D,D):M-(me+W/2)+Ie/2,q=i==="start"?L-j-oe:i==="center"?L-(j+pe/2)+ye/2:i==="end"?L-re+te+ye:ps(j,re,pe,oe,te+ye,L,L+I,I);var Ce=$.scrollLeft,we=$.scrollTop;M+=we-(le=Math.max(0,Math.min(we+le,$.scrollHeight-W+Ie))),L+=Ce-(q=Math.max(0,Math.min(Ce+q,$.scrollWidth-pe+ye)))}F.push({el:$,top:le,left:q})}return F}function yc(e){return e===Object(e)&&Object.keys(e).length!==0}function Ob(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(s){var o=s.el,i=s.top,c=s.left;o.scroll&&n?o.scroll({top:i,left:c,behavior:t}):(o.scrollTop=i,o.scrollLeft=c)})}function Bb(e){return e===!1?{block:"end",inline:"nearest"}:yc(e)?e:{block:"start",inline:"nearest"}}function Tc(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(yc(t)&&typeof t.behavior=="function")return t.behavior(n?[]:vc(e,t));if(!n){var s=Bb(t);return Ob(vc(e,s),s.behavior)}}var Ab=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Tc});const Pb={alt:"string",size:"SpinnerSize",title:"string"},Fb=G(N({},Y),{alt:y.exports.string,size:be(_.SpinnerSize),title:y.exports.string});function us(e){const m=e,{alt:t,className:n,size:s=_.SpinnerSize.MEDIUM,"data-testid":o,title:i,unsafelyReplaceClassName:c}=m,l=z(m,["alt","className","size","data-testid","title","unsafelyReplaceClassName"]),{t:p}=a.useContext(Oe),u=t||i||p("design-system:spinner.defaultAltText"),f=K(c||"sps-spinner",`sps-spinner--${s}`,n);return a.createElement("i",N({className:f,"data-testid":o,title:u},l))}Object.assign(us,{props:Pb,propTypes:Fb,displayName:"SpsSpinner"});const Kb=60;function ms(e){return typeof e=="undefined"?"inherit":`${e}px`}function wc(e){switch(e){case _.Position.TOP_LEFT:return _.Position.BOTTOM_LEFT;case _.Position.TOP_MIDDLE:return _.Position.BOTTOM_MIDDLE;case _.Position.TOP_RIGHT:return _.Position.BOTTOM_RIGHT;case _.Position.RIGHT_TOP:return _.Position.LEFT_TOP;case _.Position.RIGHT_MIDDLE:return _.Position.LEFT_MIDDLE;case _.Position.RIGHT_BOTTOM:return _.Position.LEFT_BOTTOM;case _.Position.BOTTOM_RIGHT:return _.Position.TOP_RIGHT;case _.Position.BOTTOM_MIDDLE:return _.Position.TOP_MIDDLE;case _.Position.BOTTOM_LEFT:return _.Position.TOP_LEFT;case _.Position.LEFT_BOTTOM:return _.Position.RIGHT_BOTTOM;case _.Position.LEFT_MIDDLE:return _.Position.RIGHT_MIDDLE;case _.Position.LEFT_TOP:return _.Position.RIGHT_TOP}}function Vb(e,t,n,s,o,i,c,l){const p=c&&c.current,u=p?p.scrollTop:window.pageYOffset,f=l?0:u,m=p?p.scrollLeft:window.pageXOffset,g=l?0:m,[S,w]=e.split(" ");let x,C,D,I;switch(S){case"top":D=t.height-n.top-f-i[0];break;case"left":C=t.width-n.left-g-i[0];break;case"right":I=n.right+g-i[0];break;case"bottom":x=n.bottom+f-i[0];break;default:throw new Error(`Invalid position ${e}`)}switch(w){case"left":I=n.left+g+i[1];break;case"top":x=n.top+f+i[1];break;case"middle":S==="top"||S==="bottom"?I=n.left+g+n.width/2-o/2+i[1]:(S==="left"||S==="right")&&(x=n.top+f+n.height/2-s.height/2+i[1]);break;case"bottom":D=t.height-n.bottom-f+i[1];break;case"right":C=t.width-n.right-g+i[1];break;default:throw new Error(`Invalid position ${e}`)}return[x,C,D,I]}function Cn(e,t,n,{altPosition:s,setMinWidth:o=!1,setWidth:i=!1,parentElementRef:c,fixed:l=!1,offsets:p=[0,0]}){if(e.current&&t.current){const u=Math.max(document.documentElement.clientHeight,window.innerHeight||0),f=document.documentElement.getBoundingClientRect().width,m=c&&c.current?c.current:document.documentElement,g=l?{width:f,height:u,top:0,left:0,bottom:u,right:f}:m.getBoundingClientRect(),S=e.current.getBoundingClientRect(),w=t.current.getBoundingClientRect(),[x]=n.split(" ");let C=n;s&&(x==="top"&&w.top-S.height<Kb||x==="right"&&w.right+S.width>f||x==="bottom"&&w.bottom+S.height>u||x==="left"&&w.left-S.width<0)&&(C=s);const D=o?Math.max(w.width,S.width):S.width,I=i?w.width:D,[v,k,R,B]=Vb(C,g,w,S,I,p,c,l),M={top:ms(v),right:ms(k),bottom:ms(R),left:ms(B)};return l&&(M.position="fixed",M.zIndex=_.ZStratum.BAR),o&&(M.minWidth=`${w.width}px`),i&&(M.width=`${w.width}px`),[M,C===s]}return[{},!1]}const Mt=H.createContext(null);function zn(e,t=[]){const n=H.useContext(Mt);return H.useMemo(()=>s=>{const i=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let c,l=i.lastElementChild;for(;l!==i.firstElementChild;){if(l.hasAttribute("data-portalid")&&l.getAttribute("data-portalid")===e){c=l;break}l=l.previousElementSibling}if(c)i.contains(c)||i.appendChild(c);else{c=document.createElement("div"),c.setAttribute("data-portalid",e);for(const p of t)c.classList.add(p);i.appendChild(c)}return Hr.createPortal(s,c)},[n])}const $b={docs:{options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",captionKey:"string",disabledOptions:"any[]",comparisonKey:"string",tall:"boolean",textKey:"string",valueKey:"string",zeroState:"string",maxHeightPx:"number",maxHeightRem:"number",disableOptionsMemoization:"boolean",onSpecialActionSelect:"() => void"},propTypes:{captionKey:y.exports.string,comparisonKey:y.exports.string,disabledOptions:y.exports.arrayOf(y.exports.any),options:y.exports.oneOfType([y.exports.array,y.exports.instanceOf(Promise),ne()]).isRequired,tall:y.exports.bool,textKey:y.exports.string,valueKey:y.exports.string,zeroState:y.exports.string,maxHeightPx:y.exports.number,maxHeightRem:y.exports.number}},Hb={hideInlineSearch:y.exports.bool,onSearchChange:ne(),search:y.exports.string,searchDebounce:y.exports.number,searchPlaceholder:y.exports.string,searchInputRef:Ft(),onSpecialActionSelect:ne()},Wb=G(N(N(N({},Y),$b.propTypes),Hb),{attachTo:Ft().isRequired,conformWidth:y.exports.bool,id:y.exports.string.isRequired,isOpen:y.exports.bool,keepOpen:y.exports.bool,keyDown:ce(),nullOption:y.exports.string,offsets:y.exports.arrayOf(y.exports.number),onOptionListChanged:ne(),onOptionSelected:ne(),onPositionFlip:ne(),onSelfToggle:ne(),optionRole:y.exports.string,positionOverride:y.exports.arrayOf(be(_.Position)),selectedOption:y.exports.any,specialAction:ne(),ignoreWidthStyles:y.exports.bool,loading:y.exports.bool,filterByTextAndCaptionKey:y.exports.bool,disableOptionsMemoization:y.exports.bool});async function Ec(e,t,n,s,o,i){const c=typeof e.options=="function"?e.options(t.value):e.options||[],l=c instanceof Promise,p=m=>m.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:l}),i.current=l?c:null;const u=l?await c||[]:c||[];if(l&&i.current!==c)return;let f=Array.from(u).filter(Boolean).map(m=>new _.SpsOptionListOption(m,typeof m=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&f.unshift(new _.SpsOptionListOption(null,{text:e.nullOption})),t.value){const m=p(t.value);n({replacementPattern:new RegExp(m,"ig")}),f=f.filter(g=>{const S=new RegExp(m,"i"),w=p(g.text);return e.filterByTextAndCaptionKey?S.test(w)||S.test(p(g.caption)):S.test(w)})}else n({replacementPattern:null});if(e.disabledOptions)for(const m of f)e.disabledOptions.includes(m.value)&&(m.disabled=!0);s(Object.freeze(f)),e.onOptionListChanged&&e.onOptionListChanged(f.length),o(f.some(m=>m.value&&!!m.value.icon)),n({pending:!1})}function Gb(e,t,n){const[s,o]=a.useState(Object.freeze([])),[i,c]=a.useState(!1),l=a.useRef(null),p=a.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const u=a.useMemo(()=>typeof p.current=="function"?T.debounce(Ec,typeof e.searchDebounce!="undefined"?e.searchDebounce:500):Ec,[p.current,e.disabledOptions]);return a.useEffect(()=>{u(e,t,n,o,c,l)},[p.current,t.value,e.disabledOptions]),[s,i]}class on{constructor(t,n){this.target=t,this.isPgStoppedInternal=!1,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 Ub(e,t){return N(N({},e),t)}function Kt(e){return H.useReducer(Ub,e)}function Yb({hideInlineSearch:e,options:t,onSearchChange:n,search:s="",searchPlaceholder:o="Search\u2026",searchInputRef:i}){const[c,l]=Kt({isAsync:typeof t=="function",pending:!1,value:s,replacementPattern:null}),p=a.useCallback(S=>{l({value:S.target.value}),n&&n(S)},[n]),u=a.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),S.stopPropagation()},[]),f=a.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),l({value:""}),n&&n(new on(i.current)),i.current&&i.current.focus()},[n]),m=S=>{!S||["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(S.key)||S.stopPropagation()};return a.useEffect(()=>{l({value:s})},[s]),[c.isAsync&&!e&&a.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},a.createElement("div",{className:"sps-form-control"},!c.value&&a.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),a.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:o,ref:i,value:c.value,onChange:p,onClick:u,onKeyDown:m}),c.value&&a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:f}))),c,l]}const zb=Tc||Ab,jb=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"],qb=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Jb(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function Cc(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e==null?void 0:e.find(s=>{var o;return s[t]&&s[t]===((o=n==null?void 0:n.value)==null?void 0:o[t])})):!1}const ya=a.forwardRef((e,t)=>{const An=e,{captionKey:n,comparisonKey:s,disabledOptions:o,options:i,tall:c,textKey:l,valueKey:p,zeroState:u,hideInlineSearch:f,onSearchChange:m,search:g,searchDebounce:S,searchPlaceholder:w,onSpecialActionSelect:x,attachTo:C,className:D,conformWidth:I,id:v,ignoreWidthStyles:k,isOpen:R,keepOpen:B,keyDown:M,nullOption:L,onOptionListChanged:F,onOptionSelected:A,onPositionFlip:$,onSelfToggle:V,optionRole:W,positionOverride:pe,selectedOption:me,specialAction:re,unsafelyReplaceClassName:se,loading:j,filterByTextAndCaptionKey:Z,maxHeightPx:oe,maxHeightRem:ee,disableOptionsMemoization:te,"data-testid":X}=An,le=z(An,["captionKey","comparisonKey","disabledOptions","options","tall","textKey","valueKey","zeroState","hideInlineSearch","onSearchChange","search","searchDebounce","searchPlaceholder","onSpecialActionSelect","attachTo","className","conformWidth","id","ignoreWidthStyles","isOpen","keepOpen","keyDown","nullOption","onOptionListChanged","onOptionSelected","onPositionFlip","onSelfToggle","optionRole","positionOverride","selectedOption","specialAction","unsafelyReplaceClassName","loading","filterByTextAndCaptionKey","maxHeightPx","maxHeightRem","disableOptionsMemoization","data-testid"]),q=a.useMemo(()=>re?new _.SpsOptionListOption(re,{textKey:"label",captionKey:"caption"}):null,[re]),[ye,Ie]=a.useState(-1),[Ce,we]=a.useState(R),Ke=t||a.useRef(null),$e=a.useRef(null),je=a.useRef(null),et=zn("sps-option-list-portal"),qe=a.useContext(Mt),[ut,ct]=pe||[_.Position.BOTTOM_LEFT,_.Position.TOP_LEFT],[[vt,Ee],We]=a.useState([{},!1]);a.useEffect(()=>{We(Ce?Cn(Ke,C,ut,N({altPosition:ct,setMinWidth:!k,setWidth:!k&&I},qe)):[{},!1])},[Ce,ut,ct]),a.useEffect(()=>{const ve=()=>{Ce&&We(Cn(Ke,C,ut,N({altPosition:ct,setMinWidth:!k,setWidth:!k&&I},qe)))};return document.addEventListener("scroll",ve),()=>{document.removeEventListener("scroll",ve)}},[Ce]);const Ye=a.useRef(null),[Ve,Se,He]=Yb(G(N({},e),{searchInputRef:Ye})),[Ae,Ge]=Gb(e,Se,He);a.useEffect(()=>{Ie(-1)},[Se]);const Tr=K(se||"sps-option-list","z-stratum-dropdown",Ce&&"sps-option-list--open",Se.isAsync&&"sps-option-list--searchable",Ee&&"sps-option-list--opens-upward",re&&re.label&&"sps-option-list--has-special-action",D),On=K(se||"sps-option-list__options",c&&"sps-option-list__options--tall"),tt=a.useCallback(()=>{Ce||(we(!0),Ye.current&&Ye.current.focus(),Ie(-1),V&&V(!0))},[Ce,V]),Te=a.useCallback(()=>{Ce&&(we(!1),Ie(-1),V&&V(!1))},[Ce,V]),yt=a.useCallback((ve,de)=>{de||ve&&!ve.disabled&&(typeof ve.value=="function"?(ve.value(),x&&x()):typeof A=="function"&&A(ve.value),B||Te())},[A,Te]),gn=a.useCallback((ve,de,ot)=>{ve.stopPropagation(),yt(de,ot)},[yt]),Bn=a.useRef(o||[]);Bn.current=o||[];const wr=a.useCallback(ve=>{switch(ve.key){case"Tab":case"Escape":Te();break;case"Enter":if(ye>-1){const de=Ae[ye]||q;ve.preventDefault();const ot=!!de&&Cc(Bn.current,s,de);!ot&&de&&typeof A=="function"&&typeof de.value=="function"?de.value():de&&yt(de,ot)}break;case"Up":case"ArrowUp":{let de=ye;Ee?ye<=-1?de=Ae.length-1:ye===0?re&&(de=Ae.length):ye<Ae.length&&(de=ye-1):ye>-1&&(de=ye-1),de!==ye&&(ve.preventDefault(),Ie(de));break}case"Down":case"ArrowDown":{tt();let de=ye;Ee?ye!==-1&&(ye>=Ae.length?de=0:ye===Ae.length-1?de=-1:de=ye+1):ye<Ae.length-1+Number(!!re)&&(de=ye+1),de!==ye&&(ve.preventDefault(),Ie(de));break}default:tt()}},[Te,tt,ye,yt,A,Ee,Ae]),Er=a.useCallback(ve=>{const de=Ae.findIndex(ot=>{if(ot.textKey){const Sn=ot.textKey;return ot.value[Sn].toLowerCase().charAt([0])===ve.key.toLocaleLowerCase()}return ot.value.toString().toLowerCase().charAt([0])===ve.key.toLocaleLowerCase()});de>-1&&Ie(de)},[Ae]),$a=a.useCallback(ve=>{!ve||(jb.includes(ve.key)?wr(ve):qb.includes(ve.key)&&Er(ve))},[Te,tt,ye,yt,A,Ee,Ae]);a.useEffect(()=>{if(qe!==null&&document.getElementsByClassName("sps-modal__body").length>0){const ve=()=>{V(!1)},de=document.getElementsByClassName("sps-modal__body")[0];return de.addEventListener("scroll",ve),()=>{de.removeEventListener("scroll",ve)}}},[]),a.useEffect(()=>{je.current&&zb(je.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[ye]),a.useEffect(()=>{we(R),R?Ye.current&&Ye.current.focus():Ie(-1)},[R]),a.useEffect(()=>{$a(M)},[M]),a.useEffect(()=>{!Ce&&$e.current&&(He({value:""}),$e.current.scrollTop=0),Ce&&$&&$(Ee)},[Ce]);const at=oe?oe/16:ee,Ha=at?{maxHeight:`${at}rem`}:{};return et(a.createElement("div",N({className:Tr,id:v,"aria-activedescendant":ye>-1?`${v}-option-${ye}`:null,tabIndex:-1,ref:Ke,style:vt,onMouseLeave:()=>Ie(-1),"data-testid":X},le),Ve,a.createElement("div",{className:On,ref:$e,"data-testid":`${X}-options`,style:Ha},!j&&!Se.pending&&u&&Ae.length===0&&a.createElement("div",{className:"sps-option-list__zero-state"},u),(j||Se.pending)&&a.createElement("div",{className:"sps-option-list__loading"},a.createElement(us,null)),!j&&!Se.pending&&Ae.map((ve,de)=>{const ot=`${v}-option-${de}`,Sn=Jb(ve.value,me,s),bn=Cc(Bn.current,s,ve);return a.createElement("a",{key:ot,id:ot,role:W,"aria-selected":Sn,href:ve.href,className:K("sps-option-list__option",ve.caption&&"sps-option-list__option--has-caption",ve.disabled&&"sps-option-list__option--disabled",ve.bold&&"sps-option-list__option--bold",(Sn||bn)&&"sps-option-list__option--selected",ye===de&&"sps-option-list__option--highlighted"),onClick:ia=>gn(ia,ve,bn),onMouseOver:()=>Ie(de),tabIndex:-1,ref:ye===de?je:null,"data-testid":`${X}-option-${de}`},ve.value&&ve.value.icon&&a.createElement("i",{className:K("sps-icon","sps-option-list__option-icon",`sps-icon-${String(ve.value.icon)}`)}),(!ve.value||!ve.value.icon&&Ge)&&a.createElement("span",{className:"sps-option-list__option-icon-spacer"}),a.createElement("span",{dangerouslySetInnerHTML:{__html:ve.getHtml(Se.replacementPattern)}}),ve.caption&&a.createElement("div",{className:"sps-option-list__option-caption"},a.createElement("span",{dangerouslySetInnerHTML:{__html:ve.caption.replace(Se.replacementPattern,"<u>$&</u>")}})))})),q&&re.label&&a.createElement("a",{className:K("sps-option-list__option","sps-option-list__special-action",ye===Ae.length&&"sps-option-list__option--highlighted",re.disabled&&"sps-option-list__special-action--disabled"),href:q.href,target:q.href&&re.newTab?"_blank":"_self",onClick:ve=>gn(ve,q),onMouseOver:()=>Ie(Ae.length),"data-testid":`${X}-special-action`},re.icon&&a.createElement("i",{className:K("sps-icon","sps-option-list__option-icon",`sps-icon-${String(re.icon)}`)}),!re.icon&&Ge&&a.createElement("span",{className:"sps-option-list__option-icon-spacer"}),a.createElement("span",null,re.label))))});Object.assign(ya,{propTypes:Wb,displayName:"SpsOptionList"});function Zb(e,t,n=[]){return a.useMemo(()=>o=>a.createElement(e,N({},N(N({},o),t)),o.children),n)}const xc=function({children:e,elements:t}){if(t.length===0)return a.createElement(a.Fragment,null,e);const[n,s]=Array.isArray(t[0])?t[0]:[t[0]];return a.createElement(n,N({},s!=null?s:{}),a.createElement(xc,{elements:t.slice(1)},e))},Dc=function(s){var o=s,{children:e,providers:t=[]}=o,n=z(o,["children","providers"]);return a.createElement("div",N({},n),a.createElement(xc,{elements:t},e))},Xb=function(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement(Dc,N({className:`sps-app ${t}`},n),e)};function Vt(e=[],t=[]){const n=Array.isArray(e)?T.flatten(e):[e],s=t.map(i=>Array.isArray(i)?i:[i]),o=new Array(s.length+1).fill(null).map(()=>[]);for(const i of n){let c=!1;for(let l=0;l<s.length;l+=1)for(const{type:p,props:u={}}of s[l])if(i.type===p&&Object.keys(u).every(m=>u[m]===i.props[m])){c=!0,o[l].push(i);break}c||o[o.length-1].push(i)}return o}function Ic(e,t,n){const s=Object.entries(t).filter(([,i])=>typeof i!="string"&&i.deprecated).map(([i])=>i),o=s.map(i=>n[i]);a.useEffect(()=>{o.find(i=>typeof i!="undefined")&&console.warn(`The following prop(s) of ${e} are deprecated: ${s.join(", ")}`)},o)}function Zr(e,t){const n=H.useRef(!1);H.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Nc(e,t,n){const s=a.useRef(t(...n));a.useEffect(()=>(document.addEventListener(e,s.current),()=>document.removeEventListener(e,s.current)),[]),a.useEffect(()=>{document.removeEventListener(e,s.current),s.current=t(...n),document.addEventListener(e,s.current)},n)}function Qb(e,t,n){return function(o){var i,c;!((i=e.current)==null?void 0:i.contains(o.target))&&!((c=t.current)==null?void 0:c.contains(o.target))&&n()}}function Ta(e,t,n){const s=a.useRef(!1),[o,i]=a.useState(!1),c=a.useCallback(()=>{s.current?s.current=!1:i(!0)},[]),l=a.useCallback((p=!1)=>{i(!1),s.current=p,n&&n()},[]);return Nc("mousedown",Qb,[e,t,l]),{showPopup:o,doShowPopup:c,doHidePopup:l}}const ev={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",placeholder:"string",suggestions:{type:`
|
|
197
197
|
Eventually<Iterable<string>>
|
|
198
198
|
| ((filter?: string) => Eventually<Iterable<string>>)
|
|
199
|
-
`,required:!0},tallOptionList:"boolean",value:"string",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},tv=
|
|
199
|
+
`,required:!0},tallOptionList:"boolean",value:"string",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},tv=G(N({},Y),{debounce:y.exports.number,disabled:y.exports.bool,formControl:ce(),formMeta:ce(),icon:be(_.SpsIcon),onChange:ne(),placeholder:y.exports.string,suggestions:y.exports.oneOfType([y.exports.arrayOf(y.exports.string),y.exports.instanceOf(Promise),ne()]).isRequired,tallOptionList:y.exports.bool,value:y.exports.string,zeroState:y.exports.string,loading:y.exports.bool,maxHeightOptionListPx:y.exports.number,maxHeightOptionListRem:y.exports.number,disableOptionsMemoization:y.exports.bool});function fs(k){var R=k,{className:e,debounce:t=0,disabled:n,formControl:s,formMeta:o,onChange:i,icon:c,id:l,placeholder:p="",suggestions:u,unsafelyReplaceClassName:f,tallOptionList:m,value:g="",zeroState:S,loading:w,maxHeightOptionListPx:x,maxHeightOptionListRem:C,disableOptionsMemoization:D,"data-testid":I}=R,v=z(R,["className","debounce","disabled","formControl","formMeta","onChange","icon","id","placeholder","suggestions","unsafelyReplaceClassName","tallOptionList","value","zeroState","loading","maxHeightOptionListPx","maxHeightOptionListRem","disableOptionsMemoization","data-testid"]);const B=o||s,{wrapperId:M,controlId:L}=Tt(l,B),[F,A]=Kt({keyDown:null,opensUpward:!1}),$=a.useRef(),V=a.useRef(),W=a.useRef(),{showPopup:pe,doShowPopup:me,doHidePopup:re}=Ta($,W);function se(le,q){B&&(B.setValue(le),B.markAsDirty()),i&&i(q||new on({value:le}))}function j(le){V.current.value="",se(""),le.stopPropagation()}function Z(le){se(le.target.value,le)}function oe(le){n||(["Up","ArrowUp","Down","ArrowDown","Enter"].indexOf(le.key)>-1&&(le.preventDefault(),le.persist()),le.stopPropagation(),A({keyDown:le})),le.key==="Tab"&&re()}function ee(le){le?me():re()}function te(le){A({opensUpward:le})}const X=K(f||"sps-autocomplete",pe&&"sps-autocomplete--open",pe&&"z-stratum-dropdown",F.opensUpward&&"sps-autocomplete--opens-upward",n&&"sps-form-control--disabled",e);return a.createElement(it,{id:M,className:X,formControl:s,formMeta:o,inputRef:V,ref:$,focusInputOnClick:!0,onClick:le=>le.nativeEvent.stopImmediatePropagation(),"data-testId":`${I}`},a.createElement("div",{className:"sps-text-input"},a.createElement("div",{className:"sps-form-control"},c&&a.createElement("i",{className:K("sps-text-input__icon","sps-icon",`sps-icon-${c}`)}),a.createElement("input",N({type:"text",ref:V,value:g,className:"sps-text-input__input",placeholder:p,onFocus:me,onClick:me,onChange:Z,onKeyDown:oe,disabled:n,id:L,"data-testid":`${I}__input`},v)),g&&!n&&a.createElement("i",{"aria-label":"clear",className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:le=>j(le)}))),a.createElement(ya,{id:`${M}_options`,ref:W,attachTo:$,isOpen:pe,options:u,hideInlineSearch:!0,keyDown:F.keyDown,onOptionSelected:se,onPositionFlip:te,onSelfToggle:ee,offsets:[1,0],search:g,searchDebounce:t,tall:m,zeroState:S,loading:w,maxHeightPx:x,maxHeightRem:C,disableOptionsMemoization:D}))}Object.assign(fs,{props:ev,propTypes:tv,displayName:"SpsAutocomplete"});const kc={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
200
200
|
function DemoComponent() {
|
|
201
201
|
const [color, setColor] = React.useState();
|
|
202
202
|
const colors = ["red", "blue", "green"];
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
<SpsAutocomplete suggestions={colorSearch} value={color} onChange={handleChange} placeholder="Enter a color"/>
|
|
287
287
|
);
|
|
288
288
|
}
|
|
289
|
-
`}}}},nv={alignLeft:"boolean",disabled:"boolean",icon:"SpsIcon",kind:"DropdownKind",label:"string",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string",tallOptionList:"boolean",onOpen:"() => void",onClose:"() => void",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},av=
|
|
289
|
+
`}}}},nv={alignLeft:"boolean",disabled:"boolean",icon:"SpsIcon",kind:"DropdownKind",label:"string",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string",tallOptionList:"boolean",onOpen:"() => void",onClose:"() => void",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},av=G(N({},Y),{alignLeft:y.exports.bool,disabled:y.exports.bool,icon:be(_.SpsIcon),kind:be(_.DropdownKind),label:y.exports.string,options:y.exports.arrayOf(y.exports.oneOfType([y.exports.func,y.exports.any])).isRequired,spinning:y.exports.bool,spinningTitle:y.exports.string,tallOptionList:y.exports.bool,onOpen:ne(),onClose:ne(),loading:y.exports.bool,maxHeightOptionListPx:y.exports.number,maxHeightOptionListRem:y.exports.number,disableOptionsMemoization:y.exports.bool});function xn(e){const Ce=e,{alignLeft:t,className:n,disabled:s,icon:o,id:i,kind:c,label:l,options:p=[],tabIndex:u,spinning:f,spinningTitle:m,tallOptionList:g,unsafelyReplaceClassName:S,onOpen:w,onClose:x,loading:C,maxHeightOptionListPx:D,maxHeightOptionListRem:I,disableOptionsMemoization:v}=Ce,k=z(Ce,["alignLeft","className","disabled","icon","id","kind","label","options","tabIndex","spinning","spinningTitle","tallOptionList","unsafelyReplaceClassName","onOpen","onClose","loading","maxHeightOptionListPx","maxHeightOptionListRem","disableOptionsMemoization"]),{t:R}=a.useContext(Oe),B=Gn(i),[M,L]=a.useState(!1),[F,A]=a.useState(!1),[$,V]=a.useState(null),W=p.map(we=>typeof we=="function"?we:Object.assign(we[1],N(N({},_.SPS_ACTION_DEFAULTS),we[0]))),pe=`${B.current}-button`,me=`${B.current}-menu`;let re,se;l?(se=c||_.DropdownKind.DEFAULT,re=o):(se=_.DropdownKind.ICON,re=o||_.SpsIcon.ELLIPSES);const j=a.useRef(null);a.useEffect(()=>{M&&w?w():!M&&x&&x()},[M]);function Z(){L(!1)}function oe(we){we.stopPropagation(),we.nativeEvent.stopImmediatePropagation(),we.preventDefault(),!s&&!f&&L(!M)}function ee(we){L(we)}function te(){L(!1)}function X(we){s||(["Up","ArrowUp","Down","ArrowDown"].indexOf(we.key)>-1&&we.preventDefault(),we.persist(),V(we))}function le(we){we.detail!==B.current&&L(!1)}a.useEffect(()=>(document.addEventListener("click",Z),document.addEventListener("DropdownOpened",le),()=>{document.removeEventListener("click",Z),document.removeEventListener("DropdownOpened",le)}),[]),a.useEffect(()=>{if(M){const we=document.createEvent("CustomEvent");we.initCustomEvent("DropdownOpened",!1,!1,B.current),document.dispatchEvent(we)}},[M]);const q=K(S||"sps-dropdown",M&&"sps-dropdown--open",M&&"z-stratum-dropdown",F&&"sps-dropdown--opens-upward",!l&&"sps-dropdown--no-label",s&&"disabled",n),ye=K("sps-button",`sps-button--${se}`,s&&"sps-button--disabled",f&&"sps-button--spinning"),Ie=se===_.DropdownKind.ICON&&!t?[_.Position.BOTTOM_RIGHT,_.Position.TOP_RIGHT]:null;return a.createElement("div",G(N({},k),{id:B.current,className:q,onKeyDown:X}),a.createElement(ya,{positionOverride:Ie,isOpen:M,"aria-labelledby":pe,keyDown:$,onOptionSelected:te,id:me,attachTo:j,onPositionFlip:A,onSelfToggle:ee,options:W,offsets:[0,0],tall:g,optionRole:"option",loading:C,maxHeightPx:D,maxHeightRem:I,disableOptionsMemoization:v}),a.createElement("div",{onClick:oe,className:ye,ref:j},a.createElement("button",{type:"button",id:pe,"aria-haspopup":"true","aria-controls":me,"aria-expanded":M?!0:null,tabIndex:u,disabled:s,onClick:oe},a.createElement("i",{className:K("sps-icon",`sps-icon-${re}`)}),l&&a.createElement("span",null,l),f&&a.createElement("div",{className:"sps-spinner",key:1},m||R("design-system:button.spinningTitle")))))}Object.assign(xn,{props:nv,propTypes:av,displayName:"SpsDropdown"});const sv={},rv=N({},Y);function Xr(e){const m=e,{children:t,className:n,unsafelyReplaceClassName:s}=m,o=z(m,["children","className","unsafelyReplaceClassName"]),[i,c,l]=Vt(t,[{type:Fe,props:{kind:_.ButtonKind.LINK}},[{type:Fe,props:{kind:_.ButtonKind.ICON}},{type:xn}]]),p=i.length>0&&(c.length>0||l.length>0),u=c.length>0&&l.length>0,f=K(s||"sps-button-group",n);return a.createElement("div",N({className:f},o),i.length>0&&i,p&&a.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c,u&&a.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l)}Object.assign(Xr,{props:sv,propTypes:rv,displayName:"SpsButtonGroup"});const Mc={basic:{label:"Basic Buttons",description:({NavigateTo:e})=>a.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 ",a.createElement(e,{to:"Modal"},"Modal"),"."),examples:{basic:{description:"Without Icons",jsx:T.code`
|
|
290
290
|
<>
|
|
291
291
|
<SpsButton className="mr-1 mb-1">Default</SpsButton>
|
|
292
292
|
<SpsButton className="mr-1 mb-1" kind={ButtonKind.KEY}>Key</SpsButton>
|
|
@@ -596,7 +596,7 @@
|
|
|
596
596
|
<SpsButton className="mr-2 mb-1" kind={ButtonKind.KEY}>Button</SpsButton>
|
|
597
597
|
<SpsButton className="mr-2 mb-1" kind={ButtonKind.CONFIRM}>Button</SpsButton>
|
|
598
598
|
</>
|
|
599
|
-
`}}}};function _c(e,t,n){let[s,o]=$.useState(e||t),i=$.useRef(e!==void 0),c=i.current,l=e!==void 0,p=$.useRef(s);c!==l&&console.warn("WARN: A component changed from "+(c?"controlled":"uncontrolled")+" to "+(l?"controlled":"uncontrolled")+"."),i.current=l;let u=$.useCallback(function(f){for(var m=arguments.length,g=new Array(m>1?m-1:0),S=1;S<m;S++)g[S-1]=arguments[S];let w=function(E){if(n&&!Object.is(p.current,E)){for(var D=arguments.length,I=new Array(D>1?D-1:0),v=1;v<D;v++)I[v-1]=arguments[v];n(E,...I)}l||(p.current=E)};typeof f=="function"?o(function(D){for(var I=arguments.length,v=new Array(I>1?I-1:0),N=1;N<I;N++)v[N-1]=arguments[N];let _=f(l?p.current:D,...v);return w(_,...g),l?D:_}):(l||o(f),w(f,...g))},[l,n]);return l?p.current=e:e=s,[e,u]}function ue(){return ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},ue.apply(this,arguments)}class $t extends Set{constructor(t,n,s){super(t);this.anchorKey=void 0,this.currentKey=void 0,t instanceof $t?(this.anchorKey=n||t.anchorKey,this.currentKey=s||t.currentKey):(this.anchorKey=n,this.currentKey=s)}}function ov(e){let{selectionMode:t="none",disallowEmptySelection:n}=e,s=$.useRef(!1),[,o]=$.useState(!1),i=$.useRef(null),c=$.useRef(null),[,l]=$.useState(null),p=$.useMemo(()=>Rc(e.selectedKeys),[e.selectedKeys]),u=$.useMemo(()=>Rc(e.defaultSelectedKeys,new $t),[e.defaultSelectedKeys]),[f,m]=_c(p,u,e.onSelectionChange),g=$.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]);return{selectionMode:t,disallowEmptySelection:n,get isFocused(){return s.current},setFocused(S){s.current=S,o(S)},get focusedKey(){return i.current},get childFocusStrategy(){return c.current},setFocusedKey(S,w){w===void 0&&(w="first"),i.current=S,c.current=w,l(S)},selectedKeys:f,setSelectedKeys:m,disabledKeys:g}}function Rc(e,t){return e?e==="all"?"all":new $t(e):t}class iv{constructor(t,n,s){var o;this.collection=void 0,this.state=void 0,this.allowsCellSelection=void 0,this._isSelectAll=void 0,this.collection=t,this.state=n,this.allowsCellSelection=(o=s==null?void 0:s.allowsCellSelection)!=null?o:!1,this._isSelectAll=null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}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){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.state.disabledKeys.has(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(s=>n.has(s)),this._isSelectAll}get firstSelectedKey(){var t;let n=null;for(let s of this.state.selectedKeys){let o=this.collection.getItem(s);(!n||(o==null?void 0:o.index)<n.index)&&(n=o)}return(t=n)==null?void 0:t.key}get lastSelectedKey(){var t;let n=null;for(let s of this.state.selectedKeys){let o=this.collection.getItem(s);(!n||(o==null?void 0:o.index)>n.index)&&(n=o)}return(t=n)==null?void 0:t.key}extendSelection(t){t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new $t([t],t,t);else{let s=this.state.selectedKeys,o=s.anchorKey||t;n=new $t(s,o,t);for(let i of this.getKeyRange(o,s.currentKey||t))n.delete(i);for(let i of this.getKeyRange(t,o))this.state.disabledKeys.has(i)||n.add(i)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let s=this.collection.getItem(t),o=this.collection.getItem(n);return s&&o?s.index<=o.index?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){let s=[],o=t;for(;o;){let i=this.collection.getItem(o);if((i&&i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&s.push(o),o===n)return s;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(t=this.getKey(t),t==null)return;let n=new $t(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){t=this.getKey(t),t!=null&&this.state.setSelectedKeys(new $t([t],t,t))}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new $t;for(let s of t)if(s=this.getKey(s),s!=null&&(n.add(s),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=s=>{for(;s;){if(!this.state.disabledKeys.has(s)){let o=this.collection.getItem(s);o.type==="item"&&t.push(s),o.hasChildNodes&&(this.allowsCellSelection||o.type!=="item")&&n([...o.childNodes][0].key)}s=this.collection.getKeyAfter(s)}};return n(this.collection.getFirstKey()),t}selectAll(){this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new $t)}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):n&&n.shiftKey?this.extendSelection(t):this.toggleSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let s of t)if(!n.has(s))return!1;for(let s of n)if(!t.has(s))return!1;return!0}}let Lc;Lc=Symbol.iterator;class Oc{constructor(t){var n;this.keyMap=new Map,this.iterable=void 0,this.firstKey=void 0,this.lastKey=void 0,this.iterable=t;let s=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&c.type==="section")for(let l of c.childNodes)s(l)};for(let c of t)s(c);let o,i=0;for(let[c,l]of this.keyMap)o?(o.nextKey=c,l.prevKey=o.key):(this.firstKey=c,l.prevKey=void 0),l.type==="item"&&(l.index=i++),o=l,o.nextKey=void 0;this.lastKey=(n=o)==null?void 0:n.key}*[Lc](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);return n?n.prevKey:null}getKeyAfter(t){let n=this.keyMap.get(t);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}}function lv(e){let{filter:t}=e,n=ov(e),s=$.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=l=>t?new Oc(t(l)):new Oc(l),i=$.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=eb.useCollection(e,o,i,[t]);return $.useEffect(()=>{n.focusedKey!=null&&!c.getItem(n.focusedKey)&&n.setFocusedKey(null)},[c,n.focusedKey]),{collection:c,disabledKeys:s,selectionManager:new iv(c,n)}}function cv(e){var t;let[n,s]=_c(e.selectedKey,(t=e.defaultSelectedKey)!=null?t:null,e.onSelectionChange),o=$.useMemo(()=>n!=null?[n]:[],[n]),{collection:i,disabledKeys:c,selectionManager:l}=lv(ue({},e,{selectionMode:"single",disallowEmptySelection:!0,selectedKeys:o,onSelectionChange:u=>{let f=u.values().next().value;f===n&&e.onSelectionChange&&e.onSelectionChange(f),s(f)}})),p=n!=null?i.getItem(n):null;return{collection:i,disabledKeys:c,selectionManager:l,selectedKey:n,setSelectedKey:s,selectedItem:p}}function dv(e){let t=cv(ue({},e,{suppressTextValueWarning:!0}));return $.useEffect(()=>{let n=t.selectedKey;(t.selectionManager.isEmpty||!t.collection.getItem(n))&&(n=t.collection.getFirstKey(),t.selectionManager.replaceSelection(n)),t.selectionManager.focusedKey==null&&t.selectionManager.setFocusedKey(n)},[t.selectionManager,t.selectedKey,t.collection]),t}const Qr={prefix:String(Math.round(Math.random()*1e10)),current:0},Bc=A.default.createContext(Qr);let pv=Boolean(typeof window!="undefined"&&window.document&&window.document.createElement);function uv(e){let t=$.useContext(Bc);return t===Qr&&!pv&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),$.useMemo(()=>e||"react-aria"+t.prefix+"-"+ ++t.current,[e])}function mv(){let t=$.useContext(Bc)!==Qr,[n,s]=$.useState(t);return typeof window!="undefined"&&t&&$.useLayoutEffect(()=>{s(!1)},[]),n}const fv=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),hv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gv(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize().script;return fv.has(n)}let t=e.split("-")[0];return hv.has(t)}function Ac(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:gv(e)?"rtl":"ltr"}}let eo=Ac(),wa=new Set;function Pc(){eo=Ac();for(let e of wa)e(eo)}function Sv(){let e=mv(),[t,n]=$.useState(eo);return $.useEffect(()=>(wa.size===0&&window.addEventListener("languagechange",Pc),wa.add(n),()=>{wa.delete(n),wa.size===0&&window.removeEventListener("languagechange",Pc)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const bv=A.default.createContext(null);function Fc(){let e=Sv();return $.useContext(bv)||e}const to=typeof window!="undefined"?A.default.useLayoutEffect:()=>{};let hs=new Map;function Kc(e){let t=$.useRef(!0);t.current=!0;let[n,s]=$.useState(e),o=$.useRef(null),i=uv(n),c=l=>{t.current?o.current=l:s(l)};return hs.set(i,c),to(()=>{t.current=!1},[c]),to(()=>{let l=i;return()=>{hs.delete(l)}},[i]),$.useEffect(()=>{let l=o.current;l&&(s(l),o.current=null)},[s,c]),i}function vv(e,t){if(e===t)return e;let n=hs.get(e);if(n)return n(t),t;let s=hs.get(t);return s?(s(e),e):t}function yv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(let s of t)typeof s=="function"&&s(...arguments)}}function Ea(){let e=ue({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t<arguments.length;t++){let n=t<0||arguments.length<=t?void 0:arguments[t];for(let s in n){let o=e[s],i=n[s];typeof o=="function"&&typeof i=="function"&&s[0]==="o"&&s[1]==="n"&&s.charCodeAt(2)>=65&&s.charCodeAt(2)<=90?e[s]=yv(o,i):(s==="className"||s==="UNSAFE_className")&&typeof o=="string"&&typeof i=="string"?e[s]=K(o,i):s==="id"&&o&&i?e.id=vv(o,i):e[s]=i!==void 0?i:o}}return e}function ln(e){if(Tv())e.focus({preventScroll:!0});else{let t=wv(e);e.focus(),Ev(t)}}let gs=null;function Tv(){if(gs==null){gs=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return gs=!0,!0}})}catch{}}return gs}function wv(e){for(var t=e.parentNode,n=[],s=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==s;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return s instanceof HTMLElement&&n.push({element:s,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft}),n}function Ev(e){for(let{element:t,scrollTop:n,scrollLeft:s}of e)t.scrollTop=n,t.scrollLeft=s}let jn=new Map,no=new Set;function Vc(){if(typeof window=="undefined")return;let e=n=>{let s=jn.get(n.target);s||(s=new Set,jn.set(n.target,s),n.target.addEventListener("transitioncancel",t)),s.add(n.propertyName)},t=n=>{let s=jn.get(n.target);if(!!s&&(s.delete(n.propertyName),s.size===0&&(n.target.removeEventListener("transitioncancel",t),jn.delete(n.target)),jn.size===0)){for(let o of no)o();no.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?Vc():document.addEventListener("DOMContentLoaded",Vc));function $c(e){requestAnimationFrame(()=>{jn.size===0?e():no.add(e)})}function Cv(){let e=$.useRef(new Map),t=$.useCallback((o,i,c,l)=>{e.current.set(c,{type:i,eventTarget:o,options:l}),o.addEventListener(i,c,l)},[]),n=$.useCallback((o,i,c,l)=>{o.removeEventListener(i,c,l),e.current.delete(c)},[]),s=$.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return $.useEffect(()=>s,[s]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:s}}function Hc(e,t){let{id:n,"aria-label":s,"aria-labelledby":o}=e;return n=Kc(n),o&&s?o=[...new Set([...o.trim().split(/\s+/),n])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!s&&!o&&t&&(s=t),{id:n,"aria-label":s,"aria-labelledby":o}}function xv(e,t){to(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}},[e,t])}function Dv(e){return typeof window!="undefined"&&window.navigator!=null?e.test(window.navigator.platform):!1}function Wc(){return Dv(/^Mac/)}function Iv(e,t,n,s){let o=$.useRef(n);o.current=n;let i=n==null;$.useEffect(()=>{if(i)return;let c=e.current,l=p=>o.current.call(this,p);return c.addEventListener(t,l,s),()=>{c.removeEventListener(t,l,s)}},[e,t,s,i])}function qn(e,t){if(e==null)return{};var n={},s=Object.keys(e),o,i;for(i=0;i<s.length;i++)o=s[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}let Jn="default",ao="";function Gc(){Jn==="default"&&(ao=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),Jn="disabled"}function Ss(){Jn==="disabled"&&(Jn="restoring",setTimeout(()=>{$c(()=>{Jn==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=ao||""),ao="",Jn="default")})},300))}function so(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}const Uc=A.default.createContext(null);Uc.displayName="PressResponderContext";function Nv(e){let t=$.useContext(Uc);if(t){let{register:n}=t,s=qn(t,["register"]);e=Ea(s,e),n()}return xv(t,e.ref),e}function kv(e){let t=Nv(e),{onPress:n,onPressChange:s,onPressStart:o,onPressEnd:i,onPressUp:c,isDisabled:l,isPressed:p,preventFocusOnPress:u,shouldCancelOnPointerExit:f}=t,m=qn(t,["onPress","onPressChange","onPressStart","onPressEnd","onPressUp","isDisabled","isPressed","preventFocusOnPress","shouldCancelOnPointerExit","ref"]),g=$.useRef(null);g.current={onPress:n,onPressChange:s,onPressStart:o,onPressEnd:i,onPressUp:c,isDisabled:l,shouldCancelOnPointerExit:f};let[S,w]=$.useState(!1),x=$.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:E,removeAllGlobalListeners:D}=Cv(),I=$.useMemo(()=>{let v=x.current,N=(P,U)=>{let{onPressStart:V,onPressChange:W,isDisabled:pe}=g.current;pe||v.didFirePressStart||(V&&V({type:"pressstart",pointerType:U,target:P.currentTarget,shiftKey:P.shiftKey,metaKey:P.metaKey,ctrlKey:P.ctrlKey,altKey:P.altKey}),W&&W(!0),v.didFirePressStart=!0,w(!0))},_=function(U,V,W){W===void 0&&(W=!0);let{onPressEnd:pe,onPressChange:me,onPress:re,isDisabled:se}=g.current;!v.didFirePressStart||(v.ignoreClickAfterPress=!0,v.didFirePressStart=!1,pe&&pe({type:"pressend",pointerType:V,target:U.currentTarget,shiftKey:U.shiftKey,metaKey:U.metaKey,ctrlKey:U.ctrlKey,altKey:U.altKey}),me&&me(!1),w(!1),re&&W&&!se&&re({type:"press",pointerType:V,target:U.currentTarget,shiftKey:U.shiftKey,metaKey:U.metaKey,ctrlKey:U.ctrlKey,altKey:U.altKey}))},O=(P,U)=>{let{onPressUp:V,isDisabled:W}=g.current;W||V&&V({type:"pressup",pointerType:U,target:P.currentTarget,shiftKey:P.shiftKey,metaKey:P.metaKey,ctrlKey:P.ctrlKey,altKey:P.altKey})},R=P=>{v.isPressed&&(v.isOverTarget&&_(Qt(v.target,P),v.pointerType,!1),v.isPressed=!1,v.isOverTarget=!1,v.activePointerId=null,v.pointerType=null,D(),Ss())},B={onKeyDown(P){ro(P.nativeEvent)&&P.currentTarget.contains(P.target)&&(P.preventDefault(),P.stopPropagation(),!v.isPressed&&!P.repeat&&(v.target=P.currentTarget,v.isPressed=!0,N(P,"keyboard"),E(document,"keyup",F,!1)))},onKeyUp(P){ro(P.nativeEvent)&&!P.repeat&&P.currentTarget.contains(P.target)&&O(Qt(v.target,P),"keyboard")},onClick(P){P&&!P.currentTarget.contains(P.target)||P&&P.button===0&&(P.stopPropagation(),l&&P.preventDefault(),!v.ignoreClickAfterPress&&!v.ignoreEmulatedMouseEvents&&so(P.nativeEvent)&&(!l&&!u&&ln(P.currentTarget),N(P,"virtual"),O(P,"virtual"),_(P,"virtual")),v.ignoreEmulatedMouseEvents=!1,v.ignoreClickAfterPress=!1)}},F=P=>{v.isPressed&&ro(P)&&(P.preventDefault(),P.stopPropagation(),v.isPressed=!1,_(Qt(v.target,P),"keyboard",P.target===v.target),D(),(P.target===v.target&&Yc(v.target)||v.target.getAttribute("role")==="link")&&v.target.click())};if(typeof PointerEvent!="undefined"){B.onPointerDown=W=>{W.button!==0||!W.currentTarget.contains(W.target)||(oo(W.target)&&W.preventDefault(),v.pointerType=jc(W.nativeEvent)?"virtual":W.pointerType,W.stopPropagation(),v.isPressed||(v.isPressed=!0,v.isOverTarget=!0,v.activePointerId=W.pointerId,v.target=W.currentTarget,!l&&!u&&ln(W.currentTarget),Gc(),N(W,v.pointerType),E(document,"pointermove",P,!1),E(document,"pointerup",U,!1),E(document,"pointercancel",V,!1)))},B.onMouseDown=W=>{!W.currentTarget.contains(W.target)||W.button===0&&(oo(W.target)&&W.preventDefault(),W.stopPropagation())},B.onPointerUp=W=>{!W.currentTarget.contains(W.target)||W.button===0&&Zn(W,W.currentTarget)&&O(W,v.pointerType||(jc(W.nativeEvent)?"virtual":W.pointerType))};let P=W=>{W.pointerId===v.activePointerId&&(Zn(W,v.target)?v.isOverTarget||(v.isOverTarget=!0,N(Qt(v.target,W),v.pointerType)):v.isOverTarget&&(v.isOverTarget=!1,_(Qt(v.target,W),v.pointerType,!1),g.current.shouldCancelOnPointerExit&&R(W)))},U=W=>{W.pointerId===v.activePointerId&&v.isPressed&&W.button===0&&(Zn(W,v.target)?_(Qt(v.target,W),v.pointerType):v.isOverTarget&&_(Qt(v.target,W),v.pointerType,!1),v.isPressed=!1,v.isOverTarget=!1,v.activePointerId=null,v.pointerType=null,D(),Ss())},V=W=>{R(W)};B.onDragStart=W=>{!W.currentTarget.contains(W.target)||R(W)}}else{B.onMouseDown=V=>{V.button!==0||!V.currentTarget.contains(V.target)||(oo(V.target)&&V.preventDefault(),V.stopPropagation(),!v.ignoreEmulatedMouseEvents&&(v.isPressed=!0,v.isOverTarget=!0,v.target=V.currentTarget,v.pointerType=so(V.nativeEvent)?"virtual":"mouse",!l&&!u&&ln(V.currentTarget),N(V,v.pointerType),E(document,"mouseup",P,!1)))},B.onMouseEnter=V=>{!V.currentTarget.contains(V.target)||(V.stopPropagation(),v.isPressed&&!v.ignoreEmulatedMouseEvents&&(v.isOverTarget=!0,N(V,v.pointerType)))},B.onMouseLeave=V=>{!V.currentTarget.contains(V.target)||(V.stopPropagation(),v.isPressed&&!v.ignoreEmulatedMouseEvents&&(v.isOverTarget=!1,_(V,v.pointerType,!1),g.current.shouldCancelOnPointerExit&&R(V)))},B.onMouseUp=V=>{!V.currentTarget.contains(V.target)||!v.ignoreEmulatedMouseEvents&&V.button===0&&O(V,v.pointerType)};let P=V=>{if(V.button===0){if(v.isPressed=!1,D(),v.ignoreEmulatedMouseEvents){v.ignoreEmulatedMouseEvents=!1;return}Zn(V,v.target)?_(Qt(v.target,V),v.pointerType):v.isOverTarget&&_(Qt(v.target,V),v.pointerType,!1),v.isOverTarget=!1}};B.onTouchStart=V=>{if(!V.currentTarget.contains(V.target))return;V.stopPropagation();let W=Mv(V.nativeEvent);!W||(v.activePointerId=W.identifier,v.ignoreEmulatedMouseEvents=!0,v.isOverTarget=!0,v.isPressed=!0,v.target=V.currentTarget,v.pointerType="touch",!l&&!u&&ln(V.currentTarget),Gc(),N(V,v.pointerType),E(window,"scroll",U,!0))},B.onTouchMove=V=>{if(!V.currentTarget.contains(V.target)||(V.stopPropagation(),!v.isPressed))return;let W=zc(V.nativeEvent,v.activePointerId);W&&Zn(W,V.currentTarget)?v.isOverTarget||(v.isOverTarget=!0,N(V,v.pointerType)):v.isOverTarget&&(v.isOverTarget=!1,_(V,v.pointerType,!1),g.current.shouldCancelOnPointerExit&&R(V))},B.onTouchEnd=V=>{if(!V.currentTarget.contains(V.target)||(V.stopPropagation(),!v.isPressed))return;let W=zc(V.nativeEvent,v.activePointerId);W&&Zn(W,V.currentTarget)?(O(V,v.pointerType),_(V,v.pointerType)):v.isOverTarget&&_(V,v.pointerType,!1),v.isPressed=!1,v.activePointerId=null,v.isOverTarget=!1,v.ignoreEmulatedMouseEvents=!0,Ss(),D()},B.onTouchCancel=V=>{!V.currentTarget.contains(V.target)||(V.stopPropagation(),v.isPressed&&R(V))};let U=V=>{v.isPressed&&V.target.contains(v.target)&&R({currentTarget:v.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};B.onDragStart=V=>{!V.currentTarget.contains(V.target)||R(V)}}return B},[E,l,u,D]);return $.useEffect(()=>()=>Ss(),[]),{isPressed:p||S,pressProps:Ea(m,I)}}function Yc(e){return e.tagName==="A"&&e.hasAttribute("href")}function ro(e){const{key:t,target:n}=e,s=n,{tagName:o,isContentEditable:i}=s,c=s.getAttribute("role");return(t==="Enter"||t===" "||t==="Spacebar")&&o!=="INPUT"&&o!=="TEXTAREA"&&i!==!0&&(!Yc(s)||c==="button"&&t!=="Enter")&&!(c==="link"&&t!=="Enter")}function Mv(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function zc(e,t){const n=e.changedTouches;for(let s=0;s<n.length;s++){const o=n[s];if(o.identifier===t)return o}return null}function Qt(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function _v(e){let t=e.width/2||e.radiusX||0,n=e.height/2||e.radiusY||0;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Rv(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Zn(e,t){let n=t.getBoundingClientRect(),s=_v(e);return Rv(n,s)}function oo(e){return!e.closest('[draggable="true"]')}function jc(e){return e.width===0&&e.height===0}let Ca=null,Lv=new Set,qc=!1,Dn=!1,io=!1;function lo(e,t){for(let n of Lv)n(e,t)}function Ov(e){return!(e.metaKey||!Wc()&&e.altKey||e.ctrlKey||e.type==="keyup"&&(e.key==="Control"||e.key==="Shift"))}function Jc(e){Dn=!0,Ov(e)&&(Ca="keyboard",lo("keyboard",e))}function Xn(e){Ca="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Dn=!0,lo("pointer",e))}function Bv(e){so(e)&&(Dn=!0,Ca="virtual")}function Av(e){e.target===window||e.target===document||(!Dn&&!io&&(Ca="virtual",lo("virtual",e)),Dn=!1,io=!1)}function Pv(){Dn=!1,io=!0}function Zc(){if(typeof window=="undefined"||qc)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Dn=!0,e.apply(this,arguments)},document.addEventListener("keydown",Jc,!0),document.addEventListener("keyup",Jc,!0),document.addEventListener("click",Bv,!0),window.addEventListener("focus",Av,!0),window.addEventListener("blur",Pv,!1),typeof PointerEvent!="undefined"?(document.addEventListener("pointerdown",Xn,!0),document.addEventListener("pointermove",Xn,!0),document.addEventListener("pointerup",Xn,!0)):(document.addEventListener("mousedown",Xn,!0),document.addEventListener("mousemove",Xn,!0),document.addEventListener("mouseup",Xn,!0)),qc=!0}typeof document!="undefined"&&(document.readyState!=="loading"?Zc():document.addEventListener("DOMContentLoaded",Zc));function Fv(){return Ca}function Xc(e){if(Fv()==="virtual"){let t=document.activeElement;$c(()=>{document.activeElement===t&&document.contains(e)&&ln(e)})}else ln(e)}function Kv(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,s=t!=="none"&&n!=="hidden"&&n!=="collapse";if(s){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:i,visibility:c}=o(e);s=i!=="none"&&c!=="hidden"&&c!=="collapse"}return s}function Vv(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Qc(e,t){return e.nodeName!=="#comment"&&Kv(e)&&Vv(e,t)&&(!e.parentElement||Qc(e.parentElement,e))}const co=["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]"],$v=co.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";co.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Hv=co.join(':not([hidden]):not([tabindex="-1"]),');function Wv(e,t){return t.some(n=>n.contains(e))}function ed(e,t,n){let s=t!=null&&t.tabbable?Hv:$v,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var c;return t!=null&&(c=t.from)!=null&&c.contains(i)?NodeFilter.FILTER_REJECT:i.matches(s)&&Qc(i)&&(!n||Wv(i,n))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}function Gv(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:s}=e,o=$.useRef({search:"",timeout:null}).current,i=c=>{let l=Uv(c.key);if(!l||c.ctrlKey||c.metaKey)return;l===" "&&o.search.trim().length>0&&(c.preventDefault(),"continuePropagation"in c||c.stopPropagation()),o.search+=l;let p=t.getKeyForSearch(o.search,n.focusedKey);p==null&&(p=t.getKeyForSearch(o.search)),p!=null&&(n.setFocusedKey(p),s&&s(p)),clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},500)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:null}}}function Uv(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function xa(e){return Wc()?e.metaKey:e.ctrlKey}function Yv(e){let{selectionManager:t,keyboardDelegate:n,ref:s,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:c=!1,disallowSelectAll:l=!1,selectOnFocus:p=!1,disallowTypeAhead:u=!1,shouldUseVirtualFocus:f,allowsTabNavigation:m=!1,isVirtualized:g,scrollRef:S=s}=e,{direction:w}=Fc(),x=R=>{if(R.altKey&&R.key==="Tab"&&R.preventDefault(),R.altKey||!s.current.contains(R.target))return;const B=(F,P)=>{F!=null&&(t.setFocusedKey(F,P),R.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(F):p&&t.replaceSelection(F))};switch(R.key){case"ArrowDown":{if(n.getKeyBelow){R.preventDefault();let F=t.focusedKey!=null?n.getKeyBelow(t.focusedKey):n.getFirstKey==null?void 0:n.getFirstKey();F==null&&i&&(F=n.getFirstKey==null?void 0:n.getFirstKey(t.focusedKey)),B(F)}break}case"ArrowUp":{if(n.getKeyAbove){R.preventDefault();let F=t.focusedKey!=null?n.getKeyAbove(t.focusedKey):n.getLastKey==null?void 0:n.getLastKey();F==null&&i&&(F=n.getLastKey==null?void 0:n.getLastKey(t.focusedKey)),B(F)}break}case"ArrowLeft":{if(n.getKeyLeftOf){R.preventDefault();let F=n.getKeyLeftOf(t.focusedKey);B(F,w==="rtl"?"first":"last")}break}case"ArrowRight":{if(n.getKeyRightOf){R.preventDefault();let F=n.getKeyRightOf(t.focusedKey);B(F,w==="rtl"?"last":"first")}break}case"Home":if(n.getFirstKey){R.preventDefault();let F=n.getFirstKey(t.focusedKey,xa(R));t.setFocusedKey(F),xa(R)&&R.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(F):p&&t.replaceSelection(F)}break;case"End":if(n.getLastKey){R.preventDefault();let F=n.getLastKey(t.focusedKey,xa(R));t.setFocusedKey(F),xa(R)&&R.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(F):p&&t.replaceSelection(F)}break;case"PageDown":if(n.getKeyPageBelow){R.preventDefault();let F=n.getKeyPageBelow(t.focusedKey);B(F)}break;case"PageUp":if(n.getKeyPageAbove){R.preventDefault();let F=n.getKeyPageAbove(t.focusedKey);B(F)}break;case"a":xa(R)&&t.selectionMode==="multiple"&&l!==!0&&(R.preventDefault(),t.selectAll());break;case"Escape":R.preventDefault(),c||t.clearSelection();break;case"Tab":if(!m){if(R.shiftKey)s.current.focus();else{let F=ed(s.current,{tabbable:!0}),P,U;do U=F.lastChild(),U&&(P=U);while(U);P&&!P.contains(document.activeElement)&&ln(P)}break}}},E=$.useRef({top:0,left:0});Iv(S,"scroll",g?null:()=>{E.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let D=R=>{if(t.isFocused){R.currentTarget.contains(R.target)||t.setFocused(!1);return}if(!!R.currentTarget.contains(R.target)){if(t.setFocused(!0),t.focusedKey==null){let P=R.relatedTarget;if(P&&R.currentTarget.compareDocumentPosition(P)&Node.DOCUMENT_POSITION_FOLLOWING){var B;t.setFocusedKey((B=t.lastSelectedKey)!=null?B:n.getLastKey())}else{var F;t.setFocusedKey((F=t.firstSelectedKey)!=null?F:n.getFirstKey())}}else if(!g){S.current.scrollTop=E.current.top,S.current.scrollLeft=E.current.left;let P=S.current.querySelector('[data-key="'+t.focusedKey+'"]');P&&(ln(P),td(S.current,P))}}},I=R=>{R.currentTarget.contains(R.relatedTarget)||t.setFocused(!1)};const v=$.useRef(o);$.useEffect(()=>{if(v.current){let R=null;o==="first"&&(R=n.getFirstKey()),o==="last"&&(R=n.getLastKey());let B=t.selectedKeys;B.size&&(R=B.values().next().value),t.setFocused(!0),t.setFocusedKey(R),R==null&&!f&&Xc(s.current)}v.current=!1},[]),$.useEffect(()=>{if(!g&&t.focusedKey&&S!=null&&S.current){let R=S.current.querySelector('[data-key="'+t.focusedKey+'"]');R&&td(S.current,R)}},[g,S,t.focusedKey]);let N={onKeyDown:x,onFocus:D,onBlur:I,onMouseDown(R){R.currentTarget.contains(R.target)&&R.preventDefault()}},{typeSelectProps:_}=Gv({keyboardDelegate:n,selectionManager:t});u||(N=Ea(_,N));let O;return f||(O=t.focusedKey==null?0:-1),{collectionProps:ue({},N,{tabIndex:O})}}function td(e,t){let n=nd(e,t,"left"),s=nd(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,c=e.scrollLeft,l=e.scrollTop,p=c+e.offsetWidth,u=l+e.offsetHeight;n<=c?c=n:n+o>p&&(c+=n+o-p),s<=l?l=s:s+i>u&&(l+=s+i-u),e.scrollLeft=c,e.scrollTop=l}function nd(e,t,n){const s=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[s],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[s];break}t=t.offsetParent}return o}function zv(e){let{selectionManager:t,key:n,ref:s,shouldSelectOnPressUp:o,isVirtualized:i,shouldUseVirtualFocus:c,focus:l}=e,p=m=>t.select(n,m),u=n===t.focusedKey;$.useEffect(()=>{u&&t.isFocused&&!c&&document.activeElement!==s.current&&(l?l():Xc(s.current))},[s,u,t.focusedKey,t.childFocusStrategy,t.isFocused,c]);let f={};return c||(f={tabIndex:u?0:-1,onFocus(m){m.target===s.current&&t.setFocusedKey(n)}}),o?(f.onPressStart=m=>{m.pointerType==="keyboard"&&p(m)},f.onPressUp=m=>{m.pointerType!=="keyboard"&&p(m)}):(f.onPressStart=m=>{m.pointerType!=="touch"&&p(m)},f.onPress=m=>{m.pointerType==="touch"&&p(m)}),i||(f["data-key"]=n),{itemProps:f}}const ad=new WeakMap;function bs(e,t,n){return typeof t=="string"&&(t=t.replace(/\s+/g,"")),ad.get(e)+"-"+n+"-"+t}function jv(e,t,n){let{key:s,isDisabled:o}=e,{selectionManager:i,selectedKey:c}=t,l=s===c,{itemProps:p}=zv({selectionManager:i,key:s,ref:n}),u=o||t.disabledKeys.has(s),{pressProps:f}=kv(ue({},p,{isDisabled:u})),m=bs(t,s,"tab"),g=bs(t,s,"tabpanel"),{tabIndex:S}=f;return{tabProps:ue({},f,{id:m,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?g:void 0,tabIndex:u?void 0:S,role:"tab"})}}function qv(e,t,n){let[s,o]=$.useState(0);$.useLayoutEffect(()=>{if(n!=null&&n.current){let l=()=>{let u=ed(n.current,{tabbable:!0});o(u.nextNode()?void 0:0)};l();let p=new MutationObserver(l);return p.observe(n.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{p.disconnect()}}},[n]);const i=bs(t,t==null?void 0:t.selectedKey,"tabpanel"),c=Hc(ue({},e,{id:i,"aria-labelledby":bs(t,t==null?void 0:t.selectedKey,"tab")}));return{tabPanelProps:Ea(c,{tabIndex:s,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class Jv{constructor(t,n,s,o){o===void 0&&(o=new Set),this.collection=void 0,this.flipDirection=void 0,this.disabledKeys=void 0,this.orientation=void 0,this.collection=t,this.flipDirection=n==="rtl"&&s==="horizontal",this.orientation=s,this.disabledKeys=o}getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.orientation==="horizontal"?this.getPreviousKey(t):null}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.orientation==="horizontal"?this.getNextKey(t):null}getKeyAbove(t){return this.orientation==="vertical"?this.getPreviousKey(t):null}getKeyBelow(t){return this.orientation==="vertical"?this.getNextKey(t):null}getFirstKey(){let t=this.collection.getFirstKey();return this.disabledKeys.has(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return this.disabledKeys.has(t)&&(t=this.getPreviousKey(t)),t}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.disabledKeys.has(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.disabledKeys.has(t));return t}}function Zv(e,t,n){let{orientation:s="horizontal",keyboardActivation:o="automatic"}=e,{collection:i,selectionManager:c,disabledKeys:l}=t,{direction:p}=Fc(),u=$.useMemo(()=>new Jv(i,p,s,l),[i,l,s,p]),{collectionProps:f}=Yv({ref:n,selectionManager:c,keyboardDelegate:u,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:n}),m=Kc();ad.set(t,m);let g=Hc(ue({},e,{id:m}));return{tabListProps:ue({},Ea(f,g),{role:"tablist","aria-orientation":s,tabIndex:void 0})}}function sd({item:e,state:t}){const{key:n}=e,s=a.useRef(),{tabProps:o}=jv({key:n},t,s),i=t.selectedKey===n,c=t.disabledKeys.has(n);return a.createElement("div",H(k({},o),{ref:s,className:K("sps-nav__item","sps-nav__link",i&&"active",c&&"sps-nav__item--disabled")}),e.rendered)}function rd(n){var s=n,{state:e}=s,t=z(s,["state"]);const o=a.useRef(),{tabPanelProps:i}=qv(t,e,o);return a.createElement("div",H(k({},i),{ref:o,className:"sps-card__body"}),e.selectedItem?e.selectedItem.props.children:null)}const Xv={},Qv={};function vs(e){const t=dv(e),n=a.useRef(),{tabListProps:s}=Zv(e,t,n);return a.createElement(a.Fragment,null,a.createElement("div",H(k({},s),{ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"}),[...t.collection].map(o=>a.createElement(sd,{key:o.key,item:o,state:t}))),a.createElement(rd,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(vs,{props:Xv,propTypes:Qv,displayName:"SpsTabsV2"});const ey={},ty={};function ys(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement("div",k({className:K("sps-card__footer",t)},n),e)}Object.assign(ys,{props:ey,propTypes:ty,displayName:"SpsCardV2Footer"});const ny={},ay={};function Ts(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement("div",k({className:K("sps-card__header",t)},n),e)}Object.assign(Ts,{props:ny,propTypes:ay,displayName:"SpsCardV2Header"});const sy={},ry={};function po(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);const[i,c,l,p]=Vt(e,[{type:Ts},{type:vs},{type:ys}]);return a.createElement("div",k({className:K("sps-card",t)},n),i,c.length>0?c:a.createElement("div",{className:"sps-card__body"},p),l)}Object.assign(po,{props:sy,propTypes:ry,displayName:"SpsCardV2"});const oy={},iy={};function uo(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement("div",k({className:K("sps-card__title",t)},n),e)}Object.assign(uo,{props:oy,propTypes:iy,displayName:"SpsCardV2Title"});const od={general:{label:"General Usage",description:({Link:e,NavigateTo:t})=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Sizing and Layout"),a.createElement("p",null,"All varieties of Cards should be placed on the SPS Grid (i.e. the width of a Card should span a specific number of grid columns). They should never be set to a custom width. See the ",a.createElement(e,{to:"/style-and-layout/grid"},"SPS Grid")," and"," ",a.createElement(e,{to:"/style-and-layout/page-types"},"Page Layouts")," sections for more guidance on appropriate usage."),a.createElement("p",null,"The height of a Card should typically be based on the content inside of it, but in specific cases a fixed height can be set. For these cases, content will scroll vertically inside of the container."),a.createElement("h5",null,"Text Content"),a.createElement("p",null,"The only text content that can exist outside of a Card is the"," ",a.createElement(t,{to:"page-title"},"Page Title")," component"),a.createElement("p",null,"All other content should exist inside of a Card and should adhere to the SPS Design System ",a.createElement(e,{to:"/style-and-layout/typography"},"Typography")," rules."),a.createElement("h5",null,"Nesting"),a.createElement("p",null,"Avoid nesting Cards inside of other Cards when possible. If nesting is necessary, avoid nesting more than one level deep (i.e. limit nesting to a Card inside of a Card)."))},basic:{label:"Basic card",description:()=>a.createElement("p",null,"Basic Cards can include any type of general content, such as body copy, description lists, or more complex content such as forms."),examples:{basic:{jsx:T.code`
|
|
599
|
+
`}}}};function _c(e,t,n){let[s,o]=H.useState(e||t),i=H.useRef(e!==void 0),c=i.current,l=e!==void 0,p=H.useRef(s);c!==l&&console.warn("WARN: A component changed from "+(c?"controlled":"uncontrolled")+" to "+(l?"controlled":"uncontrolled")+"."),i.current=l;let u=H.useCallback(function(f){for(var m=arguments.length,g=new Array(m>1?m-1:0),S=1;S<m;S++)g[S-1]=arguments[S];let w=function(C){if(n&&!Object.is(p.current,C)){for(var D=arguments.length,I=new Array(D>1?D-1:0),v=1;v<D;v++)I[v-1]=arguments[v];n(C,...I)}l||(p.current=C)};typeof f=="function"?o(function(D){for(var I=arguments.length,v=new Array(I>1?I-1:0),k=1;k<I;k++)v[k-1]=arguments[k];let R=f(l?p.current:D,...v);return w(R,...g),l?D:R}):(l||o(f),w(f,...g))},[l,n]);return l?p.current=e:e=s,[e,u]}function ue(){return ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},ue.apply(this,arguments)}class $t extends Set{constructor(t,n,s){super(t);this.anchorKey=void 0,this.currentKey=void 0,t instanceof $t?(this.anchorKey=n||t.anchorKey,this.currentKey=s||t.currentKey):(this.anchorKey=n,this.currentKey=s)}}function ov(e){let{selectionMode:t="none",disallowEmptySelection:n}=e,s=H.useRef(!1),[,o]=H.useState(!1),i=H.useRef(null),c=H.useRef(null),[,l]=H.useState(null),p=H.useMemo(()=>Rc(e.selectedKeys),[e.selectedKeys]),u=H.useMemo(()=>Rc(e.defaultSelectedKeys,new $t),[e.defaultSelectedKeys]),[f,m]=_c(p,u,e.onSelectionChange),g=H.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]);return{selectionMode:t,disallowEmptySelection:n,get isFocused(){return s.current},setFocused(S){s.current=S,o(S)},get focusedKey(){return i.current},get childFocusStrategy(){return c.current},setFocusedKey(S,w){w===void 0&&(w="first"),i.current=S,c.current=w,l(S)},selectedKeys:f,setSelectedKeys:m,disabledKeys:g}}function Rc(e,t){return e?e==="all"?"all":new $t(e):t}class iv{constructor(t,n,s){var o;this.collection=void 0,this.state=void 0,this.allowsCellSelection=void 0,this._isSelectAll=void 0,this.collection=t,this.state=n,this.allowsCellSelection=(o=s==null?void 0:s.allowsCellSelection)!=null?o:!1,this._isSelectAll=null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}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){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.state.disabledKeys.has(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(s=>n.has(s)),this._isSelectAll}get firstSelectedKey(){var t;let n=null;for(let s of this.state.selectedKeys){let o=this.collection.getItem(s);(!n||(o==null?void 0:o.index)<n.index)&&(n=o)}return(t=n)==null?void 0:t.key}get lastSelectedKey(){var t;let n=null;for(let s of this.state.selectedKeys){let o=this.collection.getItem(s);(!n||(o==null?void 0:o.index)>n.index)&&(n=o)}return(t=n)==null?void 0:t.key}extendSelection(t){t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new $t([t],t,t);else{let s=this.state.selectedKeys,o=s.anchorKey||t;n=new $t(s,o,t);for(let i of this.getKeyRange(o,s.currentKey||t))n.delete(i);for(let i of this.getKeyRange(t,o))this.state.disabledKeys.has(i)||n.add(i)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let s=this.collection.getItem(t),o=this.collection.getItem(n);return s&&o?s.index<=o.index?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){let s=[],o=t;for(;o;){let i=this.collection.getItem(o);if((i&&i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&s.push(o),o===n)return s;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(t=this.getKey(t),t==null)return;let n=new $t(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){t=this.getKey(t),t!=null&&this.state.setSelectedKeys(new $t([t],t,t))}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new $t;for(let s of t)if(s=this.getKey(s),s!=null&&(n.add(s),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=s=>{for(;s;){if(!this.state.disabledKeys.has(s)){let o=this.collection.getItem(s);o.type==="item"&&t.push(s),o.hasChildNodes&&(this.allowsCellSelection||o.type!=="item")&&n([...o.childNodes][0].key)}s=this.collection.getKeyAfter(s)}};return n(this.collection.getFirstKey()),t}selectAll(){this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new $t)}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):n&&n.shiftKey?this.extendSelection(t):this.toggleSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let s of t)if(!n.has(s))return!1;for(let s of n)if(!t.has(s))return!1;return!0}}let Lc;Lc=Symbol.iterator;class Oc{constructor(t){var n;this.keyMap=new Map,this.iterable=void 0,this.firstKey=void 0,this.lastKey=void 0,this.iterable=t;let s=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&c.type==="section")for(let l of c.childNodes)s(l)};for(let c of t)s(c);let o,i=0;for(let[c,l]of this.keyMap)o?(o.nextKey=c,l.prevKey=o.key):(this.firstKey=c,l.prevKey=void 0),l.type==="item"&&(l.index=i++),o=l,o.nextKey=void 0;this.lastKey=(n=o)==null?void 0:n.key}*[Lc](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);return n?n.prevKey:null}getKeyAfter(t){let n=this.keyMap.get(t);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}}function lv(e){let{filter:t}=e,n=ov(e),s=H.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=l=>t?new Oc(t(l)):new Oc(l),i=H.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=eb.useCollection(e,o,i,[t]);return H.useEffect(()=>{n.focusedKey!=null&&!c.getItem(n.focusedKey)&&n.setFocusedKey(null)},[c,n.focusedKey]),{collection:c,disabledKeys:s,selectionManager:new iv(c,n)}}function cv(e){var t;let[n,s]=_c(e.selectedKey,(t=e.defaultSelectedKey)!=null?t:null,e.onSelectionChange),o=H.useMemo(()=>n!=null?[n]:[],[n]),{collection:i,disabledKeys:c,selectionManager:l}=lv(ue({},e,{selectionMode:"single",disallowEmptySelection:!0,selectedKeys:o,onSelectionChange:u=>{let f=u.values().next().value;f===n&&e.onSelectionChange&&e.onSelectionChange(f),s(f)}})),p=n!=null?i.getItem(n):null;return{collection:i,disabledKeys:c,selectionManager:l,selectedKey:n,setSelectedKey:s,selectedItem:p}}function dv(e){let t=cv(ue({},e,{suppressTextValueWarning:!0}));return H.useEffect(()=>{let n=t.selectedKey;(t.selectionManager.isEmpty||!t.collection.getItem(n))&&(n=t.collection.getFirstKey(),t.selectionManager.replaceSelection(n)),t.selectionManager.focusedKey==null&&t.selectionManager.setFocusedKey(n)},[t.selectionManager,t.selectedKey,t.collection]),t}const Qr={prefix:String(Math.round(Math.random()*1e10)),current:0},Bc=P.default.createContext(Qr);let pv=Boolean(typeof window!="undefined"&&window.document&&window.document.createElement);function uv(e){let t=H.useContext(Bc);return t===Qr&&!pv&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),H.useMemo(()=>e||"react-aria"+t.prefix+"-"+ ++t.current,[e])}function mv(){let t=H.useContext(Bc)!==Qr,[n,s]=H.useState(t);return typeof window!="undefined"&&t&&H.useLayoutEffect(()=>{s(!1)},[]),n}const fv=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),hv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gv(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize().script;return fv.has(n)}let t=e.split("-")[0];return hv.has(t)}function Ac(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:gv(e)?"rtl":"ltr"}}let eo=Ac(),wa=new Set;function Pc(){eo=Ac();for(let e of wa)e(eo)}function Sv(){let e=mv(),[t,n]=H.useState(eo);return H.useEffect(()=>(wa.size===0&&window.addEventListener("languagechange",Pc),wa.add(n),()=>{wa.delete(n),wa.size===0&&window.removeEventListener("languagechange",Pc)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const bv=P.default.createContext(null);function Fc(){let e=Sv();return H.useContext(bv)||e}const to=typeof window!="undefined"?P.default.useLayoutEffect:()=>{};let hs=new Map;function Kc(e){let t=H.useRef(!0);t.current=!0;let[n,s]=H.useState(e),o=H.useRef(null),i=uv(n),c=l=>{t.current?o.current=l:s(l)};return hs.set(i,c),to(()=>{t.current=!1},[c]),to(()=>{let l=i;return()=>{hs.delete(l)}},[i]),H.useEffect(()=>{let l=o.current;l&&(s(l),o.current=null)},[s,c]),i}function vv(e,t){if(e===t)return e;let n=hs.get(e);if(n)return n(t),t;let s=hs.get(t);return s?(s(e),e):t}function yv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(let s of t)typeof s=="function"&&s(...arguments)}}function Ea(){let e=ue({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t<arguments.length;t++){let n=t<0||arguments.length<=t?void 0:arguments[t];for(let s in n){let o=e[s],i=n[s];typeof o=="function"&&typeof i=="function"&&s[0]==="o"&&s[1]==="n"&&s.charCodeAt(2)>=65&&s.charCodeAt(2)<=90?e[s]=yv(o,i):(s==="className"||s==="UNSAFE_className")&&typeof o=="string"&&typeof i=="string"?e[s]=K(o,i):s==="id"&&o&&i?e.id=vv(o,i):e[s]=i!==void 0?i:o}}return e}function ln(e){if(Tv())e.focus({preventScroll:!0});else{let t=wv(e);e.focus(),Ev(t)}}let gs=null;function Tv(){if(gs==null){gs=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return gs=!0,!0}})}catch{}}return gs}function wv(e){for(var t=e.parentNode,n=[],s=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==s;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return s instanceof HTMLElement&&n.push({element:s,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft}),n}function Ev(e){for(let{element:t,scrollTop:n,scrollLeft:s}of e)t.scrollTop=n,t.scrollLeft=s}let jn=new Map,no=new Set;function Vc(){if(typeof window=="undefined")return;let e=n=>{let s=jn.get(n.target);s||(s=new Set,jn.set(n.target,s),n.target.addEventListener("transitioncancel",t)),s.add(n.propertyName)},t=n=>{let s=jn.get(n.target);if(!!s&&(s.delete(n.propertyName),s.size===0&&(n.target.removeEventListener("transitioncancel",t),jn.delete(n.target)),jn.size===0)){for(let o of no)o();no.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?Vc():document.addEventListener("DOMContentLoaded",Vc));function $c(e){requestAnimationFrame(()=>{jn.size===0?e():no.add(e)})}function Cv(){let e=H.useRef(new Map),t=H.useCallback((o,i,c,l)=>{e.current.set(c,{type:i,eventTarget:o,options:l}),o.addEventListener(i,c,l)},[]),n=H.useCallback((o,i,c,l)=>{o.removeEventListener(i,c,l),e.current.delete(c)},[]),s=H.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return H.useEffect(()=>s,[s]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:s}}function Hc(e,t){let{id:n,"aria-label":s,"aria-labelledby":o}=e;return n=Kc(n),o&&s?o=[...new Set([...o.trim().split(/\s+/),n])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!s&&!o&&t&&(s=t),{id:n,"aria-label":s,"aria-labelledby":o}}function xv(e,t){to(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}},[e,t])}function Dv(e){return typeof window!="undefined"&&window.navigator!=null?e.test(window.navigator.platform):!1}function Wc(){return Dv(/^Mac/)}function Iv(e,t,n,s){let o=H.useRef(n);o.current=n;let i=n==null;H.useEffect(()=>{if(i)return;let c=e.current,l=p=>o.current.call(this,p);return c.addEventListener(t,l,s),()=>{c.removeEventListener(t,l,s)}},[e,t,s,i])}function qn(e,t){if(e==null)return{};var n={},s=Object.keys(e),o,i;for(i=0;i<s.length;i++)o=s[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}let Jn="default",ao="";function Gc(){Jn==="default"&&(ao=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),Jn="disabled"}function Ss(){Jn==="disabled"&&(Jn="restoring",setTimeout(()=>{$c(()=>{Jn==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=ao||""),ao="",Jn="default")})},300))}function so(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}const Uc=P.default.createContext(null);Uc.displayName="PressResponderContext";function Nv(e){let t=H.useContext(Uc);if(t){let{register:n}=t,s=qn(t,["register"]);e=Ea(s,e),n()}return xv(t,e.ref),e}function kv(e){let t=Nv(e),{onPress:n,onPressChange:s,onPressStart:o,onPressEnd:i,onPressUp:c,isDisabled:l,isPressed:p,preventFocusOnPress:u,shouldCancelOnPointerExit:f}=t,m=qn(t,["onPress","onPressChange","onPressStart","onPressEnd","onPressUp","isDisabled","isPressed","preventFocusOnPress","shouldCancelOnPointerExit","ref"]),g=H.useRef(null);g.current={onPress:n,onPressChange:s,onPressStart:o,onPressEnd:i,onPressUp:c,isDisabled:l,shouldCancelOnPointerExit:f};let[S,w]=H.useState(!1),x=H.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:D}=Cv(),I=H.useMemo(()=>{let v=x.current,k=(A,$)=>{let{onPressStart:V,onPressChange:W,isDisabled:pe}=g.current;pe||v.didFirePressStart||(V&&V({type:"pressstart",pointerType:$,target:A.currentTarget,shiftKey:A.shiftKey,metaKey:A.metaKey,ctrlKey:A.ctrlKey,altKey:A.altKey}),W&&W(!0),v.didFirePressStart=!0,w(!0))},R=function($,V,W){W===void 0&&(W=!0);let{onPressEnd:pe,onPressChange:me,onPress:re,isDisabled:se}=g.current;!v.didFirePressStart||(v.ignoreClickAfterPress=!0,v.didFirePressStart=!1,pe&&pe({type:"pressend",pointerType:V,target:$.currentTarget,shiftKey:$.shiftKey,metaKey:$.metaKey,ctrlKey:$.ctrlKey,altKey:$.altKey}),me&&me(!1),w(!1),re&&W&&!se&&re({type:"press",pointerType:V,target:$.currentTarget,shiftKey:$.shiftKey,metaKey:$.metaKey,ctrlKey:$.ctrlKey,altKey:$.altKey}))},B=(A,$)=>{let{onPressUp:V,isDisabled:W}=g.current;W||V&&V({type:"pressup",pointerType:$,target:A.currentTarget,shiftKey:A.shiftKey,metaKey:A.metaKey,ctrlKey:A.ctrlKey,altKey:A.altKey})},M=A=>{v.isPressed&&(v.isOverTarget&&R(Qt(v.target,A),v.pointerType,!1),v.isPressed=!1,v.isOverTarget=!1,v.activePointerId=null,v.pointerType=null,D(),Ss())},L={onKeyDown(A){ro(A.nativeEvent)&&A.currentTarget.contains(A.target)&&(A.preventDefault(),A.stopPropagation(),!v.isPressed&&!A.repeat&&(v.target=A.currentTarget,v.isPressed=!0,k(A,"keyboard"),C(document,"keyup",F,!1)))},onKeyUp(A){ro(A.nativeEvent)&&!A.repeat&&A.currentTarget.contains(A.target)&&B(Qt(v.target,A),"keyboard")},onClick(A){A&&!A.currentTarget.contains(A.target)||A&&A.button===0&&(A.stopPropagation(),l&&A.preventDefault(),!v.ignoreClickAfterPress&&!v.ignoreEmulatedMouseEvents&&so(A.nativeEvent)&&(!l&&!u&&ln(A.currentTarget),k(A,"virtual"),B(A,"virtual"),R(A,"virtual")),v.ignoreEmulatedMouseEvents=!1,v.ignoreClickAfterPress=!1)}},F=A=>{v.isPressed&&ro(A)&&(A.preventDefault(),A.stopPropagation(),v.isPressed=!1,R(Qt(v.target,A),"keyboard",A.target===v.target),D(),(A.target===v.target&&Yc(v.target)||v.target.getAttribute("role")==="link")&&v.target.click())};if(typeof PointerEvent!="undefined"){L.onPointerDown=W=>{W.button!==0||!W.currentTarget.contains(W.target)||(oo(W.target)&&W.preventDefault(),v.pointerType=jc(W.nativeEvent)?"virtual":W.pointerType,W.stopPropagation(),v.isPressed||(v.isPressed=!0,v.isOverTarget=!0,v.activePointerId=W.pointerId,v.target=W.currentTarget,!l&&!u&&ln(W.currentTarget),Gc(),k(W,v.pointerType),C(document,"pointermove",A,!1),C(document,"pointerup",$,!1),C(document,"pointercancel",V,!1)))},L.onMouseDown=W=>{!W.currentTarget.contains(W.target)||W.button===0&&(oo(W.target)&&W.preventDefault(),W.stopPropagation())},L.onPointerUp=W=>{!W.currentTarget.contains(W.target)||W.button===0&&Zn(W,W.currentTarget)&&B(W,v.pointerType||(jc(W.nativeEvent)?"virtual":W.pointerType))};let A=W=>{W.pointerId===v.activePointerId&&(Zn(W,v.target)?v.isOverTarget||(v.isOverTarget=!0,k(Qt(v.target,W),v.pointerType)):v.isOverTarget&&(v.isOverTarget=!1,R(Qt(v.target,W),v.pointerType,!1),g.current.shouldCancelOnPointerExit&&M(W)))},$=W=>{W.pointerId===v.activePointerId&&v.isPressed&&W.button===0&&(Zn(W,v.target)?R(Qt(v.target,W),v.pointerType):v.isOverTarget&&R(Qt(v.target,W),v.pointerType,!1),v.isPressed=!1,v.isOverTarget=!1,v.activePointerId=null,v.pointerType=null,D(),Ss())},V=W=>{M(W)};L.onDragStart=W=>{!W.currentTarget.contains(W.target)||M(W)}}else{L.onMouseDown=V=>{V.button!==0||!V.currentTarget.contains(V.target)||(oo(V.target)&&V.preventDefault(),V.stopPropagation(),!v.ignoreEmulatedMouseEvents&&(v.isPressed=!0,v.isOverTarget=!0,v.target=V.currentTarget,v.pointerType=so(V.nativeEvent)?"virtual":"mouse",!l&&!u&&ln(V.currentTarget),k(V,v.pointerType),C(document,"mouseup",A,!1)))},L.onMouseEnter=V=>{!V.currentTarget.contains(V.target)||(V.stopPropagation(),v.isPressed&&!v.ignoreEmulatedMouseEvents&&(v.isOverTarget=!0,k(V,v.pointerType)))},L.onMouseLeave=V=>{!V.currentTarget.contains(V.target)||(V.stopPropagation(),v.isPressed&&!v.ignoreEmulatedMouseEvents&&(v.isOverTarget=!1,R(V,v.pointerType,!1),g.current.shouldCancelOnPointerExit&&M(V)))},L.onMouseUp=V=>{!V.currentTarget.contains(V.target)||!v.ignoreEmulatedMouseEvents&&V.button===0&&B(V,v.pointerType)};let A=V=>{if(V.button===0){if(v.isPressed=!1,D(),v.ignoreEmulatedMouseEvents){v.ignoreEmulatedMouseEvents=!1;return}Zn(V,v.target)?R(Qt(v.target,V),v.pointerType):v.isOverTarget&&R(Qt(v.target,V),v.pointerType,!1),v.isOverTarget=!1}};L.onTouchStart=V=>{if(!V.currentTarget.contains(V.target))return;V.stopPropagation();let W=Mv(V.nativeEvent);!W||(v.activePointerId=W.identifier,v.ignoreEmulatedMouseEvents=!0,v.isOverTarget=!0,v.isPressed=!0,v.target=V.currentTarget,v.pointerType="touch",!l&&!u&&ln(V.currentTarget),Gc(),k(V,v.pointerType),C(window,"scroll",$,!0))},L.onTouchMove=V=>{if(!V.currentTarget.contains(V.target)||(V.stopPropagation(),!v.isPressed))return;let W=zc(V.nativeEvent,v.activePointerId);W&&Zn(W,V.currentTarget)?v.isOverTarget||(v.isOverTarget=!0,k(V,v.pointerType)):v.isOverTarget&&(v.isOverTarget=!1,R(V,v.pointerType,!1),g.current.shouldCancelOnPointerExit&&M(V))},L.onTouchEnd=V=>{if(!V.currentTarget.contains(V.target)||(V.stopPropagation(),!v.isPressed))return;let W=zc(V.nativeEvent,v.activePointerId);W&&Zn(W,V.currentTarget)?(B(V,v.pointerType),R(V,v.pointerType)):v.isOverTarget&&R(V,v.pointerType,!1),v.isPressed=!1,v.activePointerId=null,v.isOverTarget=!1,v.ignoreEmulatedMouseEvents=!0,Ss(),D()},L.onTouchCancel=V=>{!V.currentTarget.contains(V.target)||(V.stopPropagation(),v.isPressed&&M(V))};let $=V=>{v.isPressed&&V.target.contains(v.target)&&M({currentTarget:v.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};L.onDragStart=V=>{!V.currentTarget.contains(V.target)||M(V)}}return L},[C,l,u,D]);return H.useEffect(()=>()=>Ss(),[]),{isPressed:p||S,pressProps:Ea(m,I)}}function Yc(e){return e.tagName==="A"&&e.hasAttribute("href")}function ro(e){const{key:t,target:n}=e,s=n,{tagName:o,isContentEditable:i}=s,c=s.getAttribute("role");return(t==="Enter"||t===" "||t==="Spacebar")&&o!=="INPUT"&&o!=="TEXTAREA"&&i!==!0&&(!Yc(s)||c==="button"&&t!=="Enter")&&!(c==="link"&&t!=="Enter")}function Mv(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function zc(e,t){const n=e.changedTouches;for(let s=0;s<n.length;s++){const o=n[s];if(o.identifier===t)return o}return null}function Qt(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function _v(e){let t=e.width/2||e.radiusX||0,n=e.height/2||e.radiusY||0;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Rv(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Zn(e,t){let n=t.getBoundingClientRect(),s=_v(e);return Rv(n,s)}function oo(e){return!e.closest('[draggable="true"]')}function jc(e){return e.width===0&&e.height===0}let Ca=null,Lv=new Set,qc=!1,Dn=!1,io=!1;function lo(e,t){for(let n of Lv)n(e,t)}function Ov(e){return!(e.metaKey||!Wc()&&e.altKey||e.ctrlKey||e.type==="keyup"&&(e.key==="Control"||e.key==="Shift"))}function Jc(e){Dn=!0,Ov(e)&&(Ca="keyboard",lo("keyboard",e))}function Xn(e){Ca="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Dn=!0,lo("pointer",e))}function Bv(e){so(e)&&(Dn=!0,Ca="virtual")}function Av(e){e.target===window||e.target===document||(!Dn&&!io&&(Ca="virtual",lo("virtual",e)),Dn=!1,io=!1)}function Pv(){Dn=!1,io=!0}function Zc(){if(typeof window=="undefined"||qc)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Dn=!0,e.apply(this,arguments)},document.addEventListener("keydown",Jc,!0),document.addEventListener("keyup",Jc,!0),document.addEventListener("click",Bv,!0),window.addEventListener("focus",Av,!0),window.addEventListener("blur",Pv,!1),typeof PointerEvent!="undefined"?(document.addEventListener("pointerdown",Xn,!0),document.addEventListener("pointermove",Xn,!0),document.addEventListener("pointerup",Xn,!0)):(document.addEventListener("mousedown",Xn,!0),document.addEventListener("mousemove",Xn,!0),document.addEventListener("mouseup",Xn,!0)),qc=!0}typeof document!="undefined"&&(document.readyState!=="loading"?Zc():document.addEventListener("DOMContentLoaded",Zc));function Fv(){return Ca}function Xc(e){if(Fv()==="virtual"){let t=document.activeElement;$c(()=>{document.activeElement===t&&document.contains(e)&&ln(e)})}else ln(e)}function Kv(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,s=t!=="none"&&n!=="hidden"&&n!=="collapse";if(s){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:i,visibility:c}=o(e);s=i!=="none"&&c!=="hidden"&&c!=="collapse"}return s}function Vv(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Qc(e,t){return e.nodeName!=="#comment"&&Kv(e)&&Vv(e,t)&&(!e.parentElement||Qc(e.parentElement,e))}const co=["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]"],$v=co.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";co.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Hv=co.join(':not([hidden]):not([tabindex="-1"]),');function Wv(e,t){return t.some(n=>n.contains(e))}function ed(e,t,n){let s=t!=null&&t.tabbable?Hv:$v,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var c;return t!=null&&(c=t.from)!=null&&c.contains(i)?NodeFilter.FILTER_REJECT:i.matches(s)&&Qc(i)&&(!n||Wv(i,n))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}function Gv(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:s}=e,o=H.useRef({search:"",timeout:null}).current,i=c=>{let l=Uv(c.key);if(!l||c.ctrlKey||c.metaKey)return;l===" "&&o.search.trim().length>0&&(c.preventDefault(),"continuePropagation"in c||c.stopPropagation()),o.search+=l;let p=t.getKeyForSearch(o.search,n.focusedKey);p==null&&(p=t.getKeyForSearch(o.search)),p!=null&&(n.setFocusedKey(p),s&&s(p)),clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},500)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?i:null}}}function Uv(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function xa(e){return Wc()?e.metaKey:e.ctrlKey}function Yv(e){let{selectionManager:t,keyboardDelegate:n,ref:s,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:c=!1,disallowSelectAll:l=!1,selectOnFocus:p=!1,disallowTypeAhead:u=!1,shouldUseVirtualFocus:f,allowsTabNavigation:m=!1,isVirtualized:g,scrollRef:S=s}=e,{direction:w}=Fc(),x=M=>{if(M.altKey&&M.key==="Tab"&&M.preventDefault(),M.altKey||!s.current.contains(M.target))return;const L=(F,A)=>{F!=null&&(t.setFocusedKey(F,A),M.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(F):p&&t.replaceSelection(F))};switch(M.key){case"ArrowDown":{if(n.getKeyBelow){M.preventDefault();let F=t.focusedKey!=null?n.getKeyBelow(t.focusedKey):n.getFirstKey==null?void 0:n.getFirstKey();F==null&&i&&(F=n.getFirstKey==null?void 0:n.getFirstKey(t.focusedKey)),L(F)}break}case"ArrowUp":{if(n.getKeyAbove){M.preventDefault();let F=t.focusedKey!=null?n.getKeyAbove(t.focusedKey):n.getLastKey==null?void 0:n.getLastKey();F==null&&i&&(F=n.getLastKey==null?void 0:n.getLastKey(t.focusedKey)),L(F)}break}case"ArrowLeft":{if(n.getKeyLeftOf){M.preventDefault();let F=n.getKeyLeftOf(t.focusedKey);L(F,w==="rtl"?"first":"last")}break}case"ArrowRight":{if(n.getKeyRightOf){M.preventDefault();let F=n.getKeyRightOf(t.focusedKey);L(F,w==="rtl"?"last":"first")}break}case"Home":if(n.getFirstKey){M.preventDefault();let F=n.getFirstKey(t.focusedKey,xa(M));t.setFocusedKey(F),xa(M)&&M.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(F):p&&t.replaceSelection(F)}break;case"End":if(n.getLastKey){M.preventDefault();let F=n.getLastKey(t.focusedKey,xa(M));t.setFocusedKey(F),xa(M)&&M.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(F):p&&t.replaceSelection(F)}break;case"PageDown":if(n.getKeyPageBelow){M.preventDefault();let F=n.getKeyPageBelow(t.focusedKey);L(F)}break;case"PageUp":if(n.getKeyPageAbove){M.preventDefault();let F=n.getKeyPageAbove(t.focusedKey);L(F)}break;case"a":xa(M)&&t.selectionMode==="multiple"&&l!==!0&&(M.preventDefault(),t.selectAll());break;case"Escape":M.preventDefault(),c||t.clearSelection();break;case"Tab":if(!m){if(M.shiftKey)s.current.focus();else{let F=ed(s.current,{tabbable:!0}),A,$;do $=F.lastChild(),$&&(A=$);while($);A&&!A.contains(document.activeElement)&&ln(A)}break}}},C=H.useRef({top:0,left:0});Iv(S,"scroll",g?null:()=>{C.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let D=M=>{if(t.isFocused){M.currentTarget.contains(M.target)||t.setFocused(!1);return}if(!!M.currentTarget.contains(M.target)){if(t.setFocused(!0),t.focusedKey==null){let A=M.relatedTarget;if(A&&M.currentTarget.compareDocumentPosition(A)&Node.DOCUMENT_POSITION_FOLLOWING){var L;t.setFocusedKey((L=t.lastSelectedKey)!=null?L:n.getLastKey())}else{var F;t.setFocusedKey((F=t.firstSelectedKey)!=null?F:n.getFirstKey())}}else if(!g){S.current.scrollTop=C.current.top,S.current.scrollLeft=C.current.left;let A=S.current.querySelector('[data-key="'+t.focusedKey+'"]');A&&(ln(A),td(S.current,A))}}},I=M=>{M.currentTarget.contains(M.relatedTarget)||t.setFocused(!1)};const v=H.useRef(o);H.useEffect(()=>{if(v.current){let M=null;o==="first"&&(M=n.getFirstKey()),o==="last"&&(M=n.getLastKey());let L=t.selectedKeys;L.size&&(M=L.values().next().value),t.setFocused(!0),t.setFocusedKey(M),M==null&&!f&&Xc(s.current)}v.current=!1},[]),H.useEffect(()=>{if(!g&&t.focusedKey&&S!=null&&S.current){let M=S.current.querySelector('[data-key="'+t.focusedKey+'"]');M&&td(S.current,M)}},[g,S,t.focusedKey]);let k={onKeyDown:x,onFocus:D,onBlur:I,onMouseDown(M){M.currentTarget.contains(M.target)&&M.preventDefault()}},{typeSelectProps:R}=Gv({keyboardDelegate:n,selectionManager:t});u||(k=Ea(R,k));let B;return f||(B=t.focusedKey==null?0:-1),{collectionProps:ue({},k,{tabIndex:B})}}function td(e,t){let n=nd(e,t,"left"),s=nd(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,c=e.scrollLeft,l=e.scrollTop,p=c+e.offsetWidth,u=l+e.offsetHeight;n<=c?c=n:n+o>p&&(c+=n+o-p),s<=l?l=s:s+i>u&&(l+=s+i-u),e.scrollLeft=c,e.scrollTop=l}function nd(e,t,n){const s=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[s],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[s];break}t=t.offsetParent}return o}function zv(e){let{selectionManager:t,key:n,ref:s,shouldSelectOnPressUp:o,isVirtualized:i,shouldUseVirtualFocus:c,focus:l}=e,p=m=>t.select(n,m),u=n===t.focusedKey;H.useEffect(()=>{u&&t.isFocused&&!c&&document.activeElement!==s.current&&(l?l():Xc(s.current))},[s,u,t.focusedKey,t.childFocusStrategy,t.isFocused,c]);let f={};return c||(f={tabIndex:u?0:-1,onFocus(m){m.target===s.current&&t.setFocusedKey(n)}}),o?(f.onPressStart=m=>{m.pointerType==="keyboard"&&p(m)},f.onPressUp=m=>{m.pointerType!=="keyboard"&&p(m)}):(f.onPressStart=m=>{m.pointerType!=="touch"&&p(m)},f.onPress=m=>{m.pointerType==="touch"&&p(m)}),i||(f["data-key"]=n),{itemProps:f}}const ad=new WeakMap;function bs(e,t,n){return typeof t=="string"&&(t=t.replace(/\s+/g,"")),ad.get(e)+"-"+n+"-"+t}function jv(e,t,n){let{key:s,isDisabled:o}=e,{selectionManager:i,selectedKey:c}=t,l=s===c,{itemProps:p}=zv({selectionManager:i,key:s,ref:n}),u=o||t.disabledKeys.has(s),{pressProps:f}=kv(ue({},p,{isDisabled:u})),m=bs(t,s,"tab"),g=bs(t,s,"tabpanel"),{tabIndex:S}=f;return{tabProps:ue({},f,{id:m,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?g:void 0,tabIndex:u?void 0:S,role:"tab"})}}function qv(e,t,n){let[s,o]=H.useState(0);H.useLayoutEffect(()=>{if(n!=null&&n.current){let l=()=>{let u=ed(n.current,{tabbable:!0});o(u.nextNode()?void 0:0)};l();let p=new MutationObserver(l);return p.observe(n.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{p.disconnect()}}},[n]);const i=bs(t,t==null?void 0:t.selectedKey,"tabpanel"),c=Hc(ue({},e,{id:i,"aria-labelledby":bs(t,t==null?void 0:t.selectedKey,"tab")}));return{tabPanelProps:Ea(c,{tabIndex:s,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class Jv{constructor(t,n,s,o){o===void 0&&(o=new Set),this.collection=void 0,this.flipDirection=void 0,this.disabledKeys=void 0,this.orientation=void 0,this.collection=t,this.flipDirection=n==="rtl"&&s==="horizontal",this.orientation=s,this.disabledKeys=o}getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.orientation==="horizontal"?this.getPreviousKey(t):null}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.orientation==="horizontal"?this.getNextKey(t):null}getKeyAbove(t){return this.orientation==="vertical"?this.getPreviousKey(t):null}getKeyBelow(t){return this.orientation==="vertical"?this.getNextKey(t):null}getFirstKey(){let t=this.collection.getFirstKey();return this.disabledKeys.has(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return this.disabledKeys.has(t)&&(t=this.getPreviousKey(t)),t}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.disabledKeys.has(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.disabledKeys.has(t));return t}}function Zv(e,t,n){let{orientation:s="horizontal",keyboardActivation:o="automatic"}=e,{collection:i,selectionManager:c,disabledKeys:l}=t,{direction:p}=Fc(),u=H.useMemo(()=>new Jv(i,p,s,l),[i,l,s,p]),{collectionProps:f}=Yv({ref:n,selectionManager:c,keyboardDelegate:u,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:n}),m=Kc();ad.set(t,m);let g=Hc(ue({},e,{id:m}));return{tabListProps:ue({},Ea(f,g),{role:"tablist","aria-orientation":s,tabIndex:void 0})}}function sd({item:e,state:t}){const{key:n}=e,s=a.useRef(),{tabProps:o}=jv({key:n},t,s),i=t.selectedKey===n,c=t.disabledKeys.has(n);return a.createElement("div",G(N({},o),{ref:s,className:K("sps-nav__item","sps-nav__link",i&&"active",c&&"sps-nav__item--disabled")}),e.rendered)}function rd(n){var s=n,{state:e}=s,t=z(s,["state"]);const o=a.useRef(),{tabPanelProps:i}=qv(t,e,o);return a.createElement("div",G(N({},i),{ref:o,className:"sps-card__body"}),e.selectedItem?e.selectedItem.props.children:null)}const Xv={},Qv={};function vs(e){const t=dv(e),n=a.useRef(),{tabListProps:s}=Zv(e,t,n);return a.createElement(a.Fragment,null,a.createElement("div",G(N({},s),{ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"}),[...t.collection].map(o=>a.createElement(sd,{key:o.key,item:o,state:t}))),a.createElement(rd,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(vs,{props:Xv,propTypes:Qv,displayName:"SpsTabsV2"});const ey={},ty={};function ys(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement("div",N({className:K("sps-card__footer",t)},n),e)}Object.assign(ys,{props:ey,propTypes:ty,displayName:"SpsCardV2Footer"});const ny={},ay={};function Ts(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement("div",N({className:K("sps-card__header",t)},n),e)}Object.assign(Ts,{props:ny,propTypes:ay,displayName:"SpsCardV2Header"});const sy={},ry={};function po(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);const[i,c,l,p]=Vt(e,[{type:Ts},{type:vs},{type:ys}]);return a.createElement("div",N({className:K("sps-card",t)},n),i,c.length>0?c:a.createElement("div",{className:"sps-card__body"},p),l)}Object.assign(po,{props:sy,propTypes:ry,displayName:"SpsCardV2"});const oy={},iy={};function uo(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement("div",N({className:K("sps-card__title",t)},n),e)}Object.assign(uo,{props:oy,propTypes:iy,displayName:"SpsCardV2Title"});const od={general:{label:"General Usage",description:({Link:e,NavigateTo:t})=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Sizing and Layout"),a.createElement("p",null,"All varieties of Cards should be placed on the SPS Grid (i.e. the width of a Card should span a specific number of grid columns). They should never be set to a custom width. See the ",a.createElement(e,{to:"/style-and-layout/grid"},"SPS Grid")," and"," ",a.createElement(e,{to:"/style-and-layout/page-types"},"Page Layouts")," sections for more guidance on appropriate usage."),a.createElement("p",null,"The height of a Card should typically be based on the content inside of it, but in specific cases a fixed height can be set. For these cases, content will scroll vertically inside of the container."),a.createElement("h5",null,"Text Content"),a.createElement("p",null,"The only text content that can exist outside of a Card is the"," ",a.createElement(t,{to:"page-title"},"Page Title")," component"),a.createElement("p",null,"All other content should exist inside of a Card and should adhere to the SPS Design System ",a.createElement(e,{to:"/style-and-layout/typography"},"Typography")," rules."),a.createElement("h5",null,"Nesting"),a.createElement("p",null,"Avoid nesting Cards inside of other Cards when possible. If nesting is necessary, avoid nesting more than one level deep (i.e. limit nesting to a Card inside of a Card)."))},basic:{label:"Basic card",description:()=>a.createElement("p",null,"Basic Cards can include any type of general content, such as body copy, description lists, or more complex content such as forms."),examples:{basic:{jsx:T.code`
|
|
600
600
|
<SpsCardV2>
|
|
601
601
|
<p>Business is changing... changing at the speed of information.</p>
|
|
602
602
|
</SpsCardV2>
|
|
@@ -833,7 +833,7 @@
|
|
|
833
833
|
</div>
|
|
834
834
|
</SpsCardV2Footer>
|
|
835
835
|
</SpsCardV2>
|
|
836
|
-
`}}}},ly={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",indeterminate:"boolean",inline:"boolean",label:"string",onChange:"ChangeEventHandler"},cy=
|
|
836
|
+
`}}}},ly={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",indeterminate:"boolean",inline:"boolean",label:"string",onChange:"ChangeEventHandler"},cy=G(N({},Y),{checked:y.exports.bool,disabled:y.exports.bool,formControl:ce(),formMeta:ce(),indeterminate:y.exports.bool,inline:y.exports.bool,label:y.exports.string,onChange:ne()});function In(S){var w=S,{checked:e,className:t,disabled:n,formControl:s,formMeta:o,id:i,indeterminate:c,inline:l,label:p,onChange:u,"data-testid":f,unsafelyReplaceClassName:m}=w,g=z(w,["checked","className","disabled","formControl","formMeta","id","indeterminate","inline","label","onChange","data-testid","unsafelyReplaceClassName"]);const x=o||s,C=a.useRef(),[D,I]=a.useState(e),[v,k]=a.useState(c),{wrapperId:R,controlId:B}=Tt(i,x);a.useEffect(()=>I(e),[e]),a.useEffect(()=>k(c),[c]),a.useEffect(()=>{C.current.indeterminate=v},[v]);const M=K(m||"sps-checkbox","sps-checkable",l&&"sps-checkable--inline",!p&&"sps-checkable--no-label",t);function L(F){I(F.target.checked),k(!1),x&&(x.setValue(F.target.checked),x.markAsDirty()),u&&u(F),C.current.focus()}return a.createElement(it,{id:R,className:M,formControl:s,formMeta:o,inputRef:C,"data-testid":f},a.createElement("input",N({type:"checkbox",ref:C,className:"sps-checkable__input",id:B,checked:D,disabled:n,"data-testId":`${f}__checkbox-input`,onChange:L},g)),a.createElement("label",{className:"sps-checkable__label",htmlFor:B},p||""))}Object.assign(In,{props:ly,propTypes:cy,displayName:"SpsCheckbox"});const id={labels:{label:"Labels",description:T.code`
|
|
837
837
|
<p>An individual checkbox should be labeled with its own <code>label</code> prop,
|
|
838
838
|
not the <code><SpsLabel></code> component.</p>
|
|
839
839
|
`,examples:{label:{react:T.code`
|
|
@@ -930,7 +930,7 @@
|
|
|
930
930
|
</SpsSummaryListRow>
|
|
931
931
|
);
|
|
932
932
|
}
|
|
933
|
-
`}}}},dy={disabled:"boolean",href:"string",kind:"ClickableTagKind",onAdd:"() => void",onRemove:"() => void"},py=
|
|
933
|
+
`}}}},dy={disabled:"boolean",href:"string",kind:"ClickableTagKind",onAdd:"() => void",onRemove:"() => void"},py=G(N({},Y),{disabled:y.exports.bool,href:y.exports.string,kind:be(_.ClickableTagKind),onAdd:ne(),onRemove:ne()});function Da(e){const D=e,{children:t,className:n,disabled:s,href:o,kind:i=_.ClickableTagKind.BLUE,onAdd:c,onRemove:l,onClick:p,"data-testid":u,unsafelyReplaceClassName:f}=D,m=z(D,["children","className","disabled","href","kind","onAdd","onRemove","onClick","data-testid","unsafelyReplaceClassName"]),g=K(f||"sps-clickable-tag",`sps-clickable-tag--${i}`,n,s&&"sps-clickable-tag--disabled",(c||l)&&"sps-clickable-tag--icon"),S=K("sps-clickable-tag__label",(o||p)&&"sps-clickable-tag__label--link"),w=a.Children.toArray(t).filter(I=>typeof I=="string").join("");function x(I){c?c():l&&l(),I.stopPropagation()}a.useEffect(()=>{if(l&&c)throw new Error("Clickable tag should have onRemove or onAdd, not both")},[c,l]);function C(I){I.stopPropagation(),p&&p(I)}return a.createElement("div",N({className:g,"data-testid":u},m),a.createElement("span",{className:S,title:w,onClick:C},o&&a.createElement("a",{href:o},t),!o&&t),(c||l)&&!s&&a.createElement("div",{className:"sps-clickable-tag__icon",onClick:s?null:x,tabIndex:-1,"aria-label":c?"Add":"Remove"},a.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${c?_.SpsIcon.PLUS_SIGN:_.SpsIcon.X}`,"data-testid":`${u}__icon`})))}Object.assign(Da,{props:dy,propTypes:py,displayName:"SpsClickableTag"});const ld={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
934
934
|
import { SpsClickableTag } from "@spscommerce/ds-react";
|
|
935
935
|
import { ClickableTagKind } from "@spscommerce/ds-shared";
|
|
936
936
|
function Component() {
|
|
@@ -1030,14 +1030,14 @@
|
|
|
1030
1030
|
</>
|
|
1031
1031
|
);
|
|
1032
1032
|
}
|
|
1033
|
-
`}}}};function mo(e,t){return mo=Object.setPrototypeOf||function(s,o){return s.__proto__=o,s},mo(e,t)}function cd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mo(e,t)}function uy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,s)}return n}function pd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dd(Object(n),!0).forEach(function(s){uy(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dd(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function pt(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 ud=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),fo=function(){return Math.random().toString(36).substring(7).split("").join(".")},md={INIT:"@@redux/INIT"+fo(),REPLACE:"@@redux/REPLACE"+fo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fo()}};function my(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 fd(e,t,n){var s;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(pt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(pt(1));return n(fd)(e,t)}if(typeof e!="function")throw new Error(pt(2));var o=e,i=t,c=[],l=c,p=!1;function u(){l===c&&(l=c.slice())}function f(){if(p)throw new Error(pt(3));return i}function m(x){if(typeof x!="function")throw new Error(pt(4));if(p)throw new Error(pt(5));var
|
|
1033
|
+
`}}}};function mo(e,t){return mo=Object.setPrototypeOf||function(s,o){return s.__proto__=o,s},mo(e,t)}function cd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mo(e,t)}function uy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,s)}return n}function pd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dd(Object(n),!0).forEach(function(s){uy(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dd(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function pt(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 ud=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),fo=function(){return Math.random().toString(36).substring(7).split("").join(".")},md={INIT:"@@redux/INIT"+fo(),REPLACE:"@@redux/REPLACE"+fo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fo()}};function my(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 fd(e,t,n){var s;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(pt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(pt(1));return n(fd)(e,t)}if(typeof e!="function")throw new Error(pt(2));var o=e,i=t,c=[],l=c,p=!1;function u(){l===c&&(l=c.slice())}function f(){if(p)throw new Error(pt(3));return i}function m(x){if(typeof x!="function")throw new Error(pt(4));if(p)throw new Error(pt(5));var C=!0;return u(),l.push(x),function(){if(!!C){if(p)throw new Error(pt(6));C=!1,u();var I=l.indexOf(x);l.splice(I,1),c=null}}}function g(x){if(!my(x))throw new Error(pt(7));if(typeof x.type=="undefined")throw new Error(pt(8));if(p)throw new Error(pt(9));try{p=!0,i=o(i,x)}finally{p=!1}for(var C=c=l,D=0;D<C.length;D++){var I=C[D];I()}return x}function S(x){if(typeof x!="function")throw new Error(pt(10));o=x,g({type:md.REPLACE})}function w(){var x,C=m;return x={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(pt(11));function v(){I.next&&I.next(f())}v();var k=C(v);return{unsubscribe:k}}},x[ud]=function(){return this},x}return g({type:md.INIT}),s={dispatch:g,subscribe:m,getState:f,replaceReducer:S},s[ud]=w,s}function hd(e,t){return function(){return t(e.apply(this,arguments))}}function gd(e,t){if(typeof e=="function")return hd(e,t);if(typeof e!="object"||e===null)throw new Error(pt(16));var n={};for(var s in e){var o=e[s];typeof o=="function"&&(n[s]=hd(o,t))}return n}function Sd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(s){return s}:t.length===1?t[0]:t.reduce(function(s,o){return function(){return s(o.apply(void 0,arguments))}})}function fy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(s){return function(){var o=s.apply(void 0,arguments),i=function(){throw new Error(pt(15))},c={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(p){return p(c)});return i=Sd.apply(void 0,l)(o.dispatch),pd(pd({},o),{},{dispatch:i})}}}var bd=P.default.createContext(null);function hy(e){e()}var vd=hy,gy=function(t){return vd=t},Sy=function(){return vd};function by(){var e=Sy(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var o=t;o;)o.callback(),o=o.next})},get:function(){for(var o=[],i=t;i;)o.push(i),i=i.next;return o},subscribe:function(o){var i=!0,c=n={callback:o,next:null,prev:n};return c.prev?c.prev.next=c:t=c,function(){!i||t===null||(i=!1,c.next?c.next.prev=c.prev:n=c.prev,c.prev?c.prev.next=c.next:t=c.next)}}}}var yd={notify:function(){},get:function(){return[]}};function Td(e,t){var n,s=yd;function o(m){return p(),s.subscribe(m)}function i(){s.notify()}function c(){f.onStateChange&&f.onStateChange()}function l(){return Boolean(n)}function p(){n||(n=t?t.addNestedSub(c):e.subscribe(c),s=by())}function u(){n&&(n(),n=void 0,s.clear(),s=yd)}var f={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:p,tryUnsubscribe:u,getListeners:function(){return s}};return f}var wd=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?H.useLayoutEffect:H.useEffect;function vy(e){var t=e.store,n=e.context,s=e.children,o=H.useMemo(function(){var l=Td(t);return l.onStateChange=l.notifyNestedSubs,{store:t,subscription:l}},[t]),i=H.useMemo(function(){return t.getState()},[t]);wd(function(){var l=o.subscription;return l.trySubscribe(),i!==t.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[o,i]);var c=n||bd;return P.default.createElement(c.Provider,{value:o},s)}var ho={exports:{}},Me={};/** @license React v16.13.1
|
|
1034
1034
|
* react-is.production.min.js
|
|
1035
1035
|
*
|
|
1036
1036
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1037
1037
|
*
|
|
1038
1038
|
* This source code is licensed under the MIT license found in the
|
|
1039
1039
|
* LICENSE file in the root directory of this source tree.
|
|
1040
|
-
*/var Je=typeof Symbol=="function"&&Symbol.for,go=Je?Symbol.for("react.element"):60103,So=Je?Symbol.for("react.portal"):60106,ws=Je?Symbol.for("react.fragment"):60107,Es=Je?Symbol.for("react.strict_mode"):60108,Cs=Je?Symbol.for("react.profiler"):60114,xs=Je?Symbol.for("react.provider"):60109,Ds=Je?Symbol.for("react.context"):60110,bo=Je?Symbol.for("react.async_mode"):60111,Is=Je?Symbol.for("react.concurrent_mode"):60111,Ns=Je?Symbol.for("react.forward_ref"):60112,ks=Je?Symbol.for("react.suspense"):60113,yy=Je?Symbol.for("react.suspense_list"):60120,Ms=Je?Symbol.for("react.memo"):60115,_s=Je?Symbol.for("react.lazy"):60116,Ty=Je?Symbol.for("react.block"):60121,wy=Je?Symbol.for("react.fundamental"):60117,Ey=Je?Symbol.for("react.responder"):60118,Cy=Je?Symbol.for("react.scope"):60119;function ht(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case go:switch(e=e.type,e){case bo:case Is:case ws:case Cs:case Es:case ks:return e;default:switch(e=e&&e.$$typeof,e){case Ds:case Ns:case _s:case Ms:case xs:return e;default:return t}}case So:return t}}}function Ed(e){return ht(e)===Is}Me.AsyncMode=bo;Me.ConcurrentMode=Is;Me.ContextConsumer=Ds;Me.ContextProvider=xs;Me.Element=go;Me.ForwardRef=Ns;Me.Fragment=ws;Me.Lazy=_s;Me.Memo=Ms;Me.Portal=So;Me.Profiler=Cs;Me.StrictMode=Es;Me.Suspense=ks;Me.isAsyncMode=function(e){return Ed(e)||ht(e)===bo};Me.isConcurrentMode=Ed;Me.isContextConsumer=function(e){return ht(e)===Ds};Me.isContextProvider=function(e){return ht(e)===xs};Me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===go};Me.isForwardRef=function(e){return ht(e)===Ns};Me.isFragment=function(e){return ht(e)===ws};Me.isLazy=function(e){return ht(e)===_s};Me.isMemo=function(e){return ht(e)===Ms};Me.isPortal=function(e){return ht(e)===So};Me.isProfiler=function(e){return ht(e)===Cs};Me.isStrictMode=function(e){return ht(e)===Es};Me.isSuspense=function(e){return ht(e)===ks};Me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ws||e===Is||e===Cs||e===Es||e===ks||e===yy||typeof e=="object"&&e!==null&&(e.$$typeof===_s||e.$$typeof===Ms||e.$$typeof===xs||e.$$typeof===Ds||e.$$typeof===Ns||e.$$typeof===wy||e.$$typeof===Ey||e.$$typeof===Cy||e.$$typeof===Ty)};Me.typeOf=ht;ho.exports=Me;var vo=ho.exports,xy={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Dy={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Iy={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Cd={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yo={};yo[vo.ForwardRef]=Iy;yo[vo.Memo]=Cd;function xd(e){return vo.isMemo(e)?Cd:yo[e.$$typeof]||xy}var Ny=Object.defineProperty,ky=Object.getOwnPropertyNames,Dd=Object.getOwnPropertySymbols,My=Object.getOwnPropertyDescriptor,_y=Object.getPrototypeOf,Id=Object.prototype;function Nd(e,t,n){if(typeof t!="string"){if(Id){var s=_y(t);s&&s!==Id&&Nd(e,s,n)}var o=ky(t);Dd&&(o=o.concat(Dd(t)));for(var i=xd(e),c=xd(t),l=0;l<o.length;++l){var p=o[l];if(!Dy[p]&&!(n&&n[p])&&!(c&&c[p])&&!(i&&i[p])){var u=My(t,p);try{Ny(e,p,u)}catch{}}}}return e}var kd=Nd,Ry=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Ly=["reactReduxForwardedRef"],Oy=[],By=[null,null];function Ay(e,t){var n=e[1];return[t.payload,n+1]}function Md(e,t,n){wd(function(){return e.apply(void 0,t)},n)}function Py(e,t,n,s,o,i,c){e.current=s,t.current=o,n.current=!1,i.current&&(i.current=null,c())}function Fy(e,t,n,s,o,i,c,l,p,u){if(!!e){var f=!1,m=null,g=function(){if(!f){var x=t.getState(),E,D;try{E=s(x,o.current)}catch(I){D=I,m=I}D||(m=null),E===i.current?c.current||p():(i.current=E,l.current=E,c.current=!0,u({type:"STORE_UPDATED",payload:{error:D}}))}};n.onStateChange=g,n.trySubscribe(),g();var S=function(){if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,m)throw m};return S}}var Ky=function(){return[null,0]};function Vy(e,t){t===void 0&&(t={});var n=t,s=n.getDisplayName,o=s===void 0?function(v){return"ConnectAdvanced("+v+")"}:s,i=n.methodName,c=i===void 0?"connectAdvanced":i,l=n.renderCountProp,p=l===void 0?void 0:l,u=n.shouldHandleStateChanges,f=u===void 0?!0:u,m=n.storeKey,g=m===void 0?"store":m;n.withRef;var S=n.forwardRef,w=S===void 0?!1:S,x=n.context,E=x===void 0?bd:x,D=qn(n,Ry),I=E;return function(N){var _=N.displayName||N.name||"Component",O=o(_),R=ue({},D,{getDisplayName:o,methodName:c,renderCountProp:p,shouldHandleStateChanges:f,storeKey:g,displayName:O,wrappedComponentName:_,WrappedComponent:N}),B=D.pure;function F(pe){return e(pe.dispatch,R)}var P=B?$.useMemo:function(pe){return pe()};function U(pe){var me=$.useMemo(function(){var We=pe.reactReduxForwardedRef,Ye=qn(pe,Ly);return[pe.context,We,Ye]},[pe]),re=me[0],se=me[1],j=me[2],Z=$.useMemo(function(){return re&&re.Consumer&&ho.exports.isContextConsumer(A.default.createElement(re.Consumer,null))?re:I},[re,I]),oe=$.useContext(Z),ee=Boolean(pe.store)&&Boolean(pe.store.getState)&&Boolean(pe.store.dispatch);Boolean(oe)&&Boolean(oe.store);var te=ee?pe.store:oe.store,X=$.useMemo(function(){return F(te)},[te]),le=$.useMemo(function(){if(!f)return By;var We=Td(te,ee?null:oe.subscription),Ye=We.notifyNestedSubs.bind(We);return[We,Ye]},[te,ee,oe]),q=le[0],ye=le[1],Ie=$.useMemo(function(){return ee?oe:ue({},oe,{subscription:q})},[ee,oe,q]),Ce=$.useReducer(Ay,Oy,Ky),we=Ce[0],Ke=we[0],$e=Ce[1];if(Ke&&Ke.error)throw Ke.error;var je=$.useRef(),et=$.useRef(j),qe=$.useRef(),ut=$.useRef(!1),ct=P(function(){return qe.current&&j===et.current?qe.current:X(te.getState(),j)},[te,Ke,j]);Md(Py,[et,je,ut,j,ct,qe,ye]),Md(Fy,[f,te,q,X,et,je,ut,qe,ye,$e],[te,q,X]);var vt=$.useMemo(function(){return A.default.createElement(N,ue({},ct,{ref:se}))},[se,N,ct]),Ee=$.useMemo(function(){return f?A.default.createElement(Z.Provider,{value:Ie},vt):vt},[Z,vt,Ie]);return Ee}var V=B?A.default.memo(U):U;if(V.WrappedComponent=N,V.displayName=U.displayName=O,w){var W=A.default.forwardRef(function(me,re){return A.default.createElement(V,ue({},me,{reactReduxForwardedRef:re}))});return W.displayName=O,W.WrappedComponent=N,kd(W,N)}return kd(V,N)}}function _d(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function To(e,t){if(_d(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!_d(e[n[o]],t[n[o]]))return!1;return!0}function $y(e,t){var n={},s=function(c){var l=e[c];typeof l=="function"&&(n[c]=function(){return t(l.apply(void 0,arguments))})};for(var o in e)s(o);return n}function wo(e){return function(n,s){var o=e(n,s);function i(){return o}return i.dependsOnOwnProps=!1,i}}function Rd(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?Boolean(e.dependsOnOwnProps):e.length!==1}function Ld(e,t){return function(s,o){o.displayName;var i=function(l,p){return i.dependsOnOwnProps?i.mapToProps(l,p):i.mapToProps(l)};return i.dependsOnOwnProps=!0,i.mapToProps=function(l,p){i.mapToProps=e,i.dependsOnOwnProps=Rd(e);var u=i(l,p);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Rd(u),u=i(l,p)),u},i}}function Hy(e){return typeof e=="function"?Ld(e):void 0}function Wy(e){return e?void 0:wo(function(t){return{dispatch:t}})}function Gy(e){return e&&typeof e=="object"?wo(function(t){return $y(e,t)}):void 0}var Uy=[Hy,Wy,Gy];function Yy(e){return typeof e=="function"?Ld(e):void 0}function zy(e){return e?void 0:wo(function(){return{}})}var jy=[Yy,zy];function qy(e,t,n){return ue({},n,e,t)}function Jy(e){return function(n,s){s.displayName;var o=s.pure,i=s.areMergedPropsEqual,c=!1,l;return function(u,f,m){var g=e(u,f,m);return c?(!o||!i(g,l))&&(l=g):(c=!0,l=g),l}}}function Zy(e){return typeof e=="function"?Jy(e):void 0}function Xy(e){return e?void 0:function(){return qy}}var Qy=[Zy,Xy],eT=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function tT(e,t,n,s){return function(i,c){return n(e(i,c),t(s,c),c)}}function nT(e,t,n,s,o){var i=o.areStatesEqual,c=o.areOwnPropsEqual,l=o.areStatePropsEqual,p=!1,u,f,m,g,S;function w(v,N){return u=v,f=N,m=e(u,f),g=t(s,f),S=n(m,g,f),p=!0,S}function x(){return m=e(u,f),t.dependsOnOwnProps&&(g=t(s,f)),S=n(m,g,f),S}function E(){return e.dependsOnOwnProps&&(m=e(u,f)),t.dependsOnOwnProps&&(g=t(s,f)),S=n(m,g,f),S}function D(){var v=e(u,f),N=!l(v,m);return m=v,N&&(S=n(m,g,f)),S}function I(v,N){var _=!c(N,f),O=!i(v,u);return u=v,f=N,_&&O?x():_?E():O?D():S}return function(N,_){return p?I(N,_):w(N,_)}}function aT(e,t){var n=t.initMapStateToProps,s=t.initMapDispatchToProps,o=t.initMergeProps,i=qn(t,eT),c=n(e,i),l=s(e,i),p=o(e,i),u=i.pure?nT:tT;return u(c,l,p,e,i)}var sT=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Eo(e,t,n){for(var s=t.length-1;s>=0;s--){var o=t[s](e);if(o)return o}return function(i,c){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+c.wrappedComponentName+".")}}function rT(e,t){return e===t}function oT(e){var t=e===void 0?{}:e,n=t.connectHOC,s=n===void 0?Vy:n,o=t.mapStateToPropsFactories,i=o===void 0?jy:o,c=t.mapDispatchToPropsFactories,l=c===void 0?Uy:c,p=t.mergePropsFactories,u=p===void 0?Qy:p,f=t.selectorFactory,m=f===void 0?aT:f;return function(S,w,x,E){E===void 0&&(E={});var D=E,I=D.pure,v=I===void 0?!0:I,N=D.areStatesEqual,_=N===void 0?rT:N,O=D.areOwnPropsEqual,R=O===void 0?To:O,B=D.areStatePropsEqual,F=B===void 0?To:B,P=D.areMergedPropsEqual,U=P===void 0?To:P,V=qn(D,sT),W=Eo(S,i,"mapStateToProps"),pe=Eo(w,l,"mapDispatchToProps"),me=Eo(x,u,"mergeProps");return s(m,ue({methodName:"connect",getDisplayName:function(se){return"Connect("+se+")"},shouldHandleStateChanges:Boolean(S),initMapStateToProps:W,initMapDispatchToProps:pe,initMergeProps:me,pure:v,areStatesEqual:_,areOwnPropsEqual:R,areStatePropsEqual:F,areMergedPropsEqual:U},V))}}var Od=oT();gy(Hr.unstable_batchedUpdates);function iT(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 Bd(e,t){var n=$.useState(function(){return{inputs:t,result:e()}})[0],s=$.useRef(!0),o=$.useRef(n),i=s.current||Boolean(t&&o.current.inputs&&iT(t,o.current.inputs)),c=i?o.current:{inputs:t,result:e()};return $.useEffect(function(){s.current=!1,o.current=c},[c]),c.result}function lT(e,t){return Bd(function(){return e},t)}var Ne=Bd,fe=lT,cT=!0,Ad="Invariant failed";function dT(e,t){if(!e)throw cT?new Error(Ad):new Error(Ad+": "+(t||""))}var _t=function(t){var n=t.top,s=t.right,o=t.bottom,i=t.left,c=s-i,l=o-n,p={top:n,right:s,bottom:o,left:i,width:c,height:l,x:i,y:n,center:{x:(s+i)/2,y:(o+n)/2}};return p},Co=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},Pd=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},pT=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},xo={top:0,right:0,bottom:0,left:0},Do=function(t){var n=t.borderBox,s=t.margin,o=s===void 0?xo:s,i=t.border,c=i===void 0?xo:i,l=t.padding,p=l===void 0?xo:l,u=_t(Co(n,o)),f=_t(Pd(n,c)),m=_t(Pd(f,p));return{marginBox:u,borderBox:_t(n),paddingBox:f,contentBox:m,margin:o,border:c,padding:p}},wt=function(t){var n=t.slice(0,-2),s=t.slice(-2);if(s!=="px")return 0;var o=Number(n);return isNaN(o)&&dT(!1),o},uT=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Rs=function(t,n){var s=t.borderBox,o=t.border,i=t.margin,c=t.padding,l=pT(s,n);return Do({borderBox:l,border:o,margin:i,padding:c})},Ls=function(t,n){return n===void 0&&(n=uT()),Rs(t,n)},Fd=function(t,n){var s={top:wt(n.marginTop),right:wt(n.marginRight),bottom:wt(n.marginBottom),left:wt(n.marginLeft)},o={top:wt(n.paddingTop),right:wt(n.paddingRight),bottom:wt(n.paddingBottom),left:wt(n.paddingLeft)},i={top:wt(n.borderTopWidth),right:wt(n.borderRightWidth),bottom:wt(n.borderBottomWidth),left:wt(n.borderLeftWidth)};return Do({borderBox:t,margin:s,padding:o,border:i})},Kd=function(t){var n=t.getBoundingClientRect(),s=window.getComputedStyle(t);return Fd(n,s)},Vd=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function mT(e,t){return!!(e===t||Vd(e)&&Vd(t))}function fT(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!mT(e[n],t[n]))return!1;return!0}function Ze(e,t){t===void 0&&(t=fT);var n,s=[],o,i=!1;function c(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];return i&&n===this&&t(l,s)||(o=e.apply(this,l),i=!0,n=this,s=l),o}return c}var hT=function(t){var n=[],s=null,o=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];n=l,!s&&(s=requestAnimationFrame(function(){s=null,t.apply(void 0,n)}))};return o.cancel=function(){!s||(cancelAnimationFrame(s),s=null)},o},Ia=hT;function $d(e,t){}$d.bind(null,"warn");$d.bind(null,"error");function cn(){}function gT(e,t){return ue({},e,{},t)}function Et(e,t,n){var s=t.map(function(o){var i=gT(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){s.forEach(function(i){i()})}}var ST="Invariant failed";function Os(e){this.message=e}Os.prototype.toString=function(){return this.message};function Q(e,t){if(!e)throw new Os(ST)}var bT=function(e){cd(t,e);function t(){for(var s,o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return s=e.call.apply(e,[this].concat(i))||this,s.callbacks=null,s.unbind=cn,s.onWindowError=function(l){var p=s.getCallbacks();p.isDragging()&&p.tryAbort();var u=l.error;u instanceof Os&&l.preventDefault()},s.getCallbacks=function(){if(!s.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return s.callbacks},s.setCallbacks=function(l){s.callbacks=l},s}var n=t.prototype;return n.componentDidMount=function(){this.unbind=Et(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(o){if(o instanceof Os){this.setState({});return}throw o},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(A.default.Component),vT=`
|
|
1040
|
+
*/var Je=typeof Symbol=="function"&&Symbol.for,go=Je?Symbol.for("react.element"):60103,So=Je?Symbol.for("react.portal"):60106,ws=Je?Symbol.for("react.fragment"):60107,Es=Je?Symbol.for("react.strict_mode"):60108,Cs=Je?Symbol.for("react.profiler"):60114,xs=Je?Symbol.for("react.provider"):60109,Ds=Je?Symbol.for("react.context"):60110,bo=Je?Symbol.for("react.async_mode"):60111,Is=Je?Symbol.for("react.concurrent_mode"):60111,Ns=Je?Symbol.for("react.forward_ref"):60112,ks=Je?Symbol.for("react.suspense"):60113,yy=Je?Symbol.for("react.suspense_list"):60120,Ms=Je?Symbol.for("react.memo"):60115,_s=Je?Symbol.for("react.lazy"):60116,Ty=Je?Symbol.for("react.block"):60121,wy=Je?Symbol.for("react.fundamental"):60117,Ey=Je?Symbol.for("react.responder"):60118,Cy=Je?Symbol.for("react.scope"):60119;function ht(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case go:switch(e=e.type,e){case bo:case Is:case ws:case Cs:case Es:case ks:return e;default:switch(e=e&&e.$$typeof,e){case Ds:case Ns:case _s:case Ms:case xs:return e;default:return t}}case So:return t}}}function Ed(e){return ht(e)===Is}Me.AsyncMode=bo;Me.ConcurrentMode=Is;Me.ContextConsumer=Ds;Me.ContextProvider=xs;Me.Element=go;Me.ForwardRef=Ns;Me.Fragment=ws;Me.Lazy=_s;Me.Memo=Ms;Me.Portal=So;Me.Profiler=Cs;Me.StrictMode=Es;Me.Suspense=ks;Me.isAsyncMode=function(e){return Ed(e)||ht(e)===bo};Me.isConcurrentMode=Ed;Me.isContextConsumer=function(e){return ht(e)===Ds};Me.isContextProvider=function(e){return ht(e)===xs};Me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===go};Me.isForwardRef=function(e){return ht(e)===Ns};Me.isFragment=function(e){return ht(e)===ws};Me.isLazy=function(e){return ht(e)===_s};Me.isMemo=function(e){return ht(e)===Ms};Me.isPortal=function(e){return ht(e)===So};Me.isProfiler=function(e){return ht(e)===Cs};Me.isStrictMode=function(e){return ht(e)===Es};Me.isSuspense=function(e){return ht(e)===ks};Me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ws||e===Is||e===Cs||e===Es||e===ks||e===yy||typeof e=="object"&&e!==null&&(e.$$typeof===_s||e.$$typeof===Ms||e.$$typeof===xs||e.$$typeof===Ds||e.$$typeof===Ns||e.$$typeof===wy||e.$$typeof===Ey||e.$$typeof===Cy||e.$$typeof===Ty)};Me.typeOf=ht;ho.exports=Me;var vo=ho.exports,xy={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Dy={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Iy={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Cd={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yo={};yo[vo.ForwardRef]=Iy;yo[vo.Memo]=Cd;function xd(e){return vo.isMemo(e)?Cd:yo[e.$$typeof]||xy}var Ny=Object.defineProperty,ky=Object.getOwnPropertyNames,Dd=Object.getOwnPropertySymbols,My=Object.getOwnPropertyDescriptor,_y=Object.getPrototypeOf,Id=Object.prototype;function Nd(e,t,n){if(typeof t!="string"){if(Id){var s=_y(t);s&&s!==Id&&Nd(e,s,n)}var o=ky(t);Dd&&(o=o.concat(Dd(t)));for(var i=xd(e),c=xd(t),l=0;l<o.length;++l){var p=o[l];if(!Dy[p]&&!(n&&n[p])&&!(c&&c[p])&&!(i&&i[p])){var u=My(t,p);try{Ny(e,p,u)}catch{}}}}return e}var kd=Nd,Ry=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Ly=["reactReduxForwardedRef"],Oy=[],By=[null,null];function Ay(e,t){var n=e[1];return[t.payload,n+1]}function Md(e,t,n){wd(function(){return e.apply(void 0,t)},n)}function Py(e,t,n,s,o,i,c){e.current=s,t.current=o,n.current=!1,i.current&&(i.current=null,c())}function Fy(e,t,n,s,o,i,c,l,p,u){if(!!e){var f=!1,m=null,g=function(){if(!f){var x=t.getState(),C,D;try{C=s(x,o.current)}catch(I){D=I,m=I}D||(m=null),C===i.current?c.current||p():(i.current=C,l.current=C,c.current=!0,u({type:"STORE_UPDATED",payload:{error:D}}))}};n.onStateChange=g,n.trySubscribe(),g();var S=function(){if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,m)throw m};return S}}var Ky=function(){return[null,0]};function Vy(e,t){t===void 0&&(t={});var n=t,s=n.getDisplayName,o=s===void 0?function(v){return"ConnectAdvanced("+v+")"}:s,i=n.methodName,c=i===void 0?"connectAdvanced":i,l=n.renderCountProp,p=l===void 0?void 0:l,u=n.shouldHandleStateChanges,f=u===void 0?!0:u,m=n.storeKey,g=m===void 0?"store":m;n.withRef;var S=n.forwardRef,w=S===void 0?!1:S,x=n.context,C=x===void 0?bd:x,D=qn(n,Ry),I=C;return function(k){var R=k.displayName||k.name||"Component",B=o(R),M=ue({},D,{getDisplayName:o,methodName:c,renderCountProp:p,shouldHandleStateChanges:f,storeKey:g,displayName:B,wrappedComponentName:R,WrappedComponent:k}),L=D.pure;function F(pe){return e(pe.dispatch,M)}var A=L?H.useMemo:function(pe){return pe()};function $(pe){var me=H.useMemo(function(){var We=pe.reactReduxForwardedRef,Ye=qn(pe,Ly);return[pe.context,We,Ye]},[pe]),re=me[0],se=me[1],j=me[2],Z=H.useMemo(function(){return re&&re.Consumer&&ho.exports.isContextConsumer(P.default.createElement(re.Consumer,null))?re:I},[re,I]),oe=H.useContext(Z),ee=Boolean(pe.store)&&Boolean(pe.store.getState)&&Boolean(pe.store.dispatch);Boolean(oe)&&Boolean(oe.store);var te=ee?pe.store:oe.store,X=H.useMemo(function(){return F(te)},[te]),le=H.useMemo(function(){if(!f)return By;var We=Td(te,ee?null:oe.subscription),Ye=We.notifyNestedSubs.bind(We);return[We,Ye]},[te,ee,oe]),q=le[0],ye=le[1],Ie=H.useMemo(function(){return ee?oe:ue({},oe,{subscription:q})},[ee,oe,q]),Ce=H.useReducer(Ay,Oy,Ky),we=Ce[0],Ke=we[0],$e=Ce[1];if(Ke&&Ke.error)throw Ke.error;var je=H.useRef(),et=H.useRef(j),qe=H.useRef(),ut=H.useRef(!1),ct=A(function(){return qe.current&&j===et.current?qe.current:X(te.getState(),j)},[te,Ke,j]);Md(Py,[et,je,ut,j,ct,qe,ye]),Md(Fy,[f,te,q,X,et,je,ut,qe,ye,$e],[te,q,X]);var vt=H.useMemo(function(){return P.default.createElement(k,ue({},ct,{ref:se}))},[se,k,ct]),Ee=H.useMemo(function(){return f?P.default.createElement(Z.Provider,{value:Ie},vt):vt},[Z,vt,Ie]);return Ee}var V=L?P.default.memo($):$;if(V.WrappedComponent=k,V.displayName=$.displayName=B,w){var W=P.default.forwardRef(function(me,re){return P.default.createElement(V,ue({},me,{reactReduxForwardedRef:re}))});return W.displayName=B,W.WrappedComponent=k,kd(W,k)}return kd(V,k)}}function _d(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function To(e,t){if(_d(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!_d(e[n[o]],t[n[o]]))return!1;return!0}function $y(e,t){var n={},s=function(c){var l=e[c];typeof l=="function"&&(n[c]=function(){return t(l.apply(void 0,arguments))})};for(var o in e)s(o);return n}function wo(e){return function(n,s){var o=e(n,s);function i(){return o}return i.dependsOnOwnProps=!1,i}}function Rd(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?Boolean(e.dependsOnOwnProps):e.length!==1}function Ld(e,t){return function(s,o){o.displayName;var i=function(l,p){return i.dependsOnOwnProps?i.mapToProps(l,p):i.mapToProps(l)};return i.dependsOnOwnProps=!0,i.mapToProps=function(l,p){i.mapToProps=e,i.dependsOnOwnProps=Rd(e);var u=i(l,p);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Rd(u),u=i(l,p)),u},i}}function Hy(e){return typeof e=="function"?Ld(e):void 0}function Wy(e){return e?void 0:wo(function(t){return{dispatch:t}})}function Gy(e){return e&&typeof e=="object"?wo(function(t){return $y(e,t)}):void 0}var Uy=[Hy,Wy,Gy];function Yy(e){return typeof e=="function"?Ld(e):void 0}function zy(e){return e?void 0:wo(function(){return{}})}var jy=[Yy,zy];function qy(e,t,n){return ue({},n,e,t)}function Jy(e){return function(n,s){s.displayName;var o=s.pure,i=s.areMergedPropsEqual,c=!1,l;return function(u,f,m){var g=e(u,f,m);return c?(!o||!i(g,l))&&(l=g):(c=!0,l=g),l}}}function Zy(e){return typeof e=="function"?Jy(e):void 0}function Xy(e){return e?void 0:function(){return qy}}var Qy=[Zy,Xy],eT=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function tT(e,t,n,s){return function(i,c){return n(e(i,c),t(s,c),c)}}function nT(e,t,n,s,o){var i=o.areStatesEqual,c=o.areOwnPropsEqual,l=o.areStatePropsEqual,p=!1,u,f,m,g,S;function w(v,k){return u=v,f=k,m=e(u,f),g=t(s,f),S=n(m,g,f),p=!0,S}function x(){return m=e(u,f),t.dependsOnOwnProps&&(g=t(s,f)),S=n(m,g,f),S}function C(){return e.dependsOnOwnProps&&(m=e(u,f)),t.dependsOnOwnProps&&(g=t(s,f)),S=n(m,g,f),S}function D(){var v=e(u,f),k=!l(v,m);return m=v,k&&(S=n(m,g,f)),S}function I(v,k){var R=!c(k,f),B=!i(v,u);return u=v,f=k,R&&B?x():R?C():B?D():S}return function(k,R){return p?I(k,R):w(k,R)}}function aT(e,t){var n=t.initMapStateToProps,s=t.initMapDispatchToProps,o=t.initMergeProps,i=qn(t,eT),c=n(e,i),l=s(e,i),p=o(e,i),u=i.pure?nT:tT;return u(c,l,p,e,i)}var sT=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Eo(e,t,n){for(var s=t.length-1;s>=0;s--){var o=t[s](e);if(o)return o}return function(i,c){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+c.wrappedComponentName+".")}}function rT(e,t){return e===t}function oT(e){var t=e===void 0?{}:e,n=t.connectHOC,s=n===void 0?Vy:n,o=t.mapStateToPropsFactories,i=o===void 0?jy:o,c=t.mapDispatchToPropsFactories,l=c===void 0?Uy:c,p=t.mergePropsFactories,u=p===void 0?Qy:p,f=t.selectorFactory,m=f===void 0?aT:f;return function(S,w,x,C){C===void 0&&(C={});var D=C,I=D.pure,v=I===void 0?!0:I,k=D.areStatesEqual,R=k===void 0?rT:k,B=D.areOwnPropsEqual,M=B===void 0?To:B,L=D.areStatePropsEqual,F=L===void 0?To:L,A=D.areMergedPropsEqual,$=A===void 0?To:A,V=qn(D,sT),W=Eo(S,i,"mapStateToProps"),pe=Eo(w,l,"mapDispatchToProps"),me=Eo(x,u,"mergeProps");return s(m,ue({methodName:"connect",getDisplayName:function(se){return"Connect("+se+")"},shouldHandleStateChanges:Boolean(S),initMapStateToProps:W,initMapDispatchToProps:pe,initMergeProps:me,pure:v,areStatesEqual:R,areOwnPropsEqual:M,areStatePropsEqual:F,areMergedPropsEqual:$},V))}}var Od=oT();gy(Hr.unstable_batchedUpdates);function iT(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 Bd(e,t){var n=H.useState(function(){return{inputs:t,result:e()}})[0],s=H.useRef(!0),o=H.useRef(n),i=s.current||Boolean(t&&o.current.inputs&&iT(t,o.current.inputs)),c=i?o.current:{inputs:t,result:e()};return H.useEffect(function(){s.current=!1,o.current=c},[c]),c.result}function lT(e,t){return Bd(function(){return e},t)}var Ne=Bd,fe=lT,cT=!0,Ad="Invariant failed";function dT(e,t){if(!e)throw cT?new Error(Ad):new Error(Ad+": "+(t||""))}var _t=function(t){var n=t.top,s=t.right,o=t.bottom,i=t.left,c=s-i,l=o-n,p={top:n,right:s,bottom:o,left:i,width:c,height:l,x:i,y:n,center:{x:(s+i)/2,y:(o+n)/2}};return p},Co=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},Pd=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},pT=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},xo={top:0,right:0,bottom:0,left:0},Do=function(t){var n=t.borderBox,s=t.margin,o=s===void 0?xo:s,i=t.border,c=i===void 0?xo:i,l=t.padding,p=l===void 0?xo:l,u=_t(Co(n,o)),f=_t(Pd(n,c)),m=_t(Pd(f,p));return{marginBox:u,borderBox:_t(n),paddingBox:f,contentBox:m,margin:o,border:c,padding:p}},wt=function(t){var n=t.slice(0,-2),s=t.slice(-2);if(s!=="px")return 0;var o=Number(n);return isNaN(o)&&dT(!1),o},uT=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Rs=function(t,n){var s=t.borderBox,o=t.border,i=t.margin,c=t.padding,l=pT(s,n);return Do({borderBox:l,border:o,margin:i,padding:c})},Ls=function(t,n){return n===void 0&&(n=uT()),Rs(t,n)},Fd=function(t,n){var s={top:wt(n.marginTop),right:wt(n.marginRight),bottom:wt(n.marginBottom),left:wt(n.marginLeft)},o={top:wt(n.paddingTop),right:wt(n.paddingRight),bottom:wt(n.paddingBottom),left:wt(n.paddingLeft)},i={top:wt(n.borderTopWidth),right:wt(n.borderRightWidth),bottom:wt(n.borderBottomWidth),left:wt(n.borderLeftWidth)};return Do({borderBox:t,margin:s,padding:o,border:i})},Kd=function(t){var n=t.getBoundingClientRect(),s=window.getComputedStyle(t);return Fd(n,s)},Vd=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function mT(e,t){return!!(e===t||Vd(e)&&Vd(t))}function fT(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!mT(e[n],t[n]))return!1;return!0}function Ze(e,t){t===void 0&&(t=fT);var n,s=[],o,i=!1;function c(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];return i&&n===this&&t(l,s)||(o=e.apply(this,l),i=!0,n=this,s=l),o}return c}var hT=function(t){var n=[],s=null,o=function(){for(var c=arguments.length,l=new Array(c),p=0;p<c;p++)l[p]=arguments[p];n=l,!s&&(s=requestAnimationFrame(function(){s=null,t.apply(void 0,n)}))};return o.cancel=function(){!s||(cancelAnimationFrame(s),s=null)},o},Ia=hT;function $d(e,t){}$d.bind(null,"warn");$d.bind(null,"error");function cn(){}function gT(e,t){return ue({},e,{},t)}function Et(e,t,n){var s=t.map(function(o){var i=gT(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){s.forEach(function(i){i()})}}var ST="Invariant failed";function Os(e){this.message=e}Os.prototype.toString=function(){return this.message};function Q(e,t){if(!e)throw new Os(ST)}var bT=function(e){cd(t,e);function t(){for(var s,o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return s=e.call.apply(e,[this].concat(i))||this,s.callbacks=null,s.unbind=cn,s.onWindowError=function(l){var p=s.getCallbacks();p.isDragging()&&p.tryAbort();var u=l.error;u instanceof Os&&l.preventDefault()},s.getCallbacks=function(){if(!s.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return s.callbacks},s.setCallbacks=function(l){s.callbacks=l},s}var n=t.prototype;return n.componentDidMount=function(){this.unbind=Et(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(o){if(o instanceof Os){this.setState({});return}throw o},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(P.default.Component),vT=`
|
|
1041
1041
|
Press space bar to start a drag.
|
|
1042
1042
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
1043
1043
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
@@ -1073,7 +1073,7 @@
|
|
|
1073
1073
|
`:`
|
|
1074
1074
|
The item has been dropped while not over a drop area.
|
|
1075
1075
|
`+Gd(t.source)+`
|
|
1076
|
-
`},As={dragHandleUsageInstructions:vT,onDragStart:yT,onDragUpdate:TT,onDragEnd:wT},Xe={x:0,y:0},nt=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},gt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},dn=function(t,n){return t.x===n.x&&t.y===n.y},Qn=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Nn=function(t,n,s){var o;return s===void 0&&(s=0),o={},o[t]=n,o[t==="x"?"y":"x"]=s,o},Na=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},Ud=function(t,n){return Math.min.apply(Math,n.map(function(s){return Na(t,s)}))},Yd=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},ET=function(e,t){var n=_t({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},ka=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},zd=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}]},CT={top:0,right:0,bottom:0,left:0},xT=function(t,n){return n?ka(t,n.scroll.diff.displacement):t},DT=function(t,n,s){if(s&&s.increasedBy){var o;return ue({},t,(o={},o[n.end]=t[n.end]+s.increasedBy[n.line],o))}return t},IT=function(t,n){return n&&n.shouldClipSubject?ET(n.pageMarginBox,t):_t(t)},ea=function(e){var t=e.page,n=e.withPlaceholder,s=e.axis,o=e.frame,i=xT(t.marginBox,o),c=DT(i,s,n),l=IT(c,o);return{page:t,withPlaceholder:n,active:l}},Io=function(e,t){e.frame||Q(!1);var n=e.frame,s=gt(t,n.scroll.initial),o=Qn(s),i=ue({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:s,displacement:o},max:n.scroll.max}}),c=ea({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i}),l=ue({},e,{frame:i,subject:c});return l};function Ps(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function No(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 pn(e,t){if(e.find)return e.find(t);var n=No(e,t);if(n!==-1)return e[n]}function jd(e){return Array.prototype.slice.call(e)}var qd=Ze(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Jd=Ze(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Fs=Ze(function(e){return Ps(e)}),NT=Ze(function(e){return Ps(e)}),ta=Ze(function(e,t){var n=NT(t).filter(function(s){return e===s.descriptor.droppableId}).sort(function(s,o){return s.descriptor.index-o.descriptor.index});return n});function ko(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Ks(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Vs=Ze(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),kT=function(e){var t=e.isMovingForward,n=e.draggable,s=e.destination,o=e.insideDestination,i=e.previousImpact;if(!s.isCombineEnabled)return null;var c=ko(i);if(!c)return null;function l(x){var E={type:"COMBINE",combine:{draggableId:x,droppableId:s.descriptor.id}};return ue({},i,{at:E})}var p=i.displaced.all,u=p.length?p[0]:null;if(t)return u?l(u):null;var f=Vs(n,o);if(!u){if(!f.length)return null;var m=f[f.length-1];return l(m.descriptor.id)}var g=No(f,function(x){return x.descriptor.id===u});g===-1&&Q(!1);var S=g-1;if(S<0)return null;var w=f[S];return l(w.descriptor.id)},na=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Zd={point:Xe,value:0},Ma={invisible:{},visible:{},all:[]},MT={displaced:Ma,displacedBy:Zd,at:null},Ct=function(e,t){return function(n){return e<=n&&n<=t}},Xd=function(e){var t=Ct(e.top,e.bottom),n=Ct(e.left,e.right);return function(s){var o=t(s.top)&&t(s.bottom)&&n(s.left)&&n(s.right);if(o)return!0;var i=t(s.top)||t(s.bottom),c=n(s.left)||n(s.right),l=i&&c;if(l)return!0;var p=s.top<e.top&&s.bottom>e.bottom,u=s.left<e.left&&s.right>e.right,f=p&&u;if(f)return!0;var m=p&&c||u&&i;return m}},_T=function(e){var t=Ct(e.top,e.bottom),n=Ct(e.left,e.right);return function(s){var o=t(s.top)&&t(s.bottom)&&n(s.left)&&n(s.right);return o}},Mo={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Qd={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},RT=function(e){return function(t){var n=Ct(t.top,t.bottom),s=Ct(t.left,t.right);return function(o){return e===Mo?n(o.top)&&n(o.bottom):s(o.left)&&s(o.right)}}},LT=function(t,n){var s=n.frame?n.frame.scroll.diff.displacement:Xe;return ka(t,s)},OT=function(t,n,s){return n.subject.active?s(n.subject.active)(t):!1},BT=function(t,n,s){return s(n)(t)},_o=function(t){var n=t.target,s=t.destination,o=t.viewport,i=t.withDroppableDisplacement,c=t.isVisibleThroughFrameFn,l=i?LT(n,s):n;return OT(l,s,c)&&BT(l,o,c)},AT=function(t){return _o(ue({},t,{isVisibleThroughFrameFn:Xd}))},ep=function(t){return _o(ue({},t,{isVisibleThroughFrameFn:_T}))},PT=function(t){return _o(ue({},t,{isVisibleThroughFrameFn:RT(t.destination.axis)}))},FT=function(t,n,s){if(typeof s=="boolean")return s;if(!n)return!0;var o=n.invisible,i=n.visible;if(o[t])return!1;var c=i[t];return c?c.shouldAnimate:!0};function KT(e,t){var n=e.page.marginBox,s={top:t.point.y,right:0,bottom:0,left:t.point.x};return _t(Co(n,s))}function _a(e){var t=e.afterDragging,n=e.destination,s=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,c=e.last;return t.reduce(function(p,u){var f=KT(u,s),m=u.descriptor.id;p.all.push(m);var g=AT({target:f,destination:n,viewport:o,withDroppableDisplacement:!0});if(!g)return p.invisible[u.descriptor.id]=!0,p;var S=FT(m,c,i),w={draggableId:m,shouldAnimate:S};return p.visible[m]=w,p},{all:[],visible:{},invisible:{}})}function VT(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function tp(e){var t=e.insideDestination,n=e.inHomeList,s=e.displacedBy,o=e.destination,i=VT(t,{inHomeList:n});return{displaced:Ma,displacedBy:s,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function $s(e){var t=e.draggable,n=e.insideDestination,s=e.destination,o=e.viewport,i=e.displacedBy,c=e.last,l=e.index,p=e.forceShouldAnimate,u=na(t,s);if(l==null)return tp({insideDestination:n,inHomeList:u,displacedBy:i,destination:s});var f=pn(n,function(x){return x.descriptor.index===l});if(!f)return tp({insideDestination:n,inHomeList:u,displacedBy:i,destination:s});var m=Vs(t,n),g=n.indexOf(f),S=m.slice(g),w=_a({afterDragging:S,destination:s,displacedBy:i,last:c,viewport:o.frame,forceShouldAnimate:p});return{displaced:w,displacedBy:i,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:l}}}}function un(e,t){return Boolean(t.effected[e])}var $T=function(e){var t=e.isMovingForward,n=e.destination,s=e.draggables,o=e.combine,i=e.afterCritical;if(!n.isCombineEnabled)return null;var c=o.draggableId,l=s[c],p=l.descriptor.index,u=un(c,i);return u?t?p:p-1:t?p+1:p},HT=function(e){var t=e.isMovingForward,n=e.isInHomeList,s=e.insideDestination,o=e.location;if(!s.length)return null;var i=o.index,c=t?i+1:i-1,l=s[0].descriptor.index,p=s[s.length-1].descriptor.index,u=n?p:p+1;return c<l||c>u?null:c},WT=function(e){var t=e.isMovingForward,n=e.isInHomeList,s=e.draggable,o=e.draggables,i=e.destination,c=e.insideDestination,l=e.previousImpact,p=e.viewport,u=e.afterCritical,f=l.at;if(f||Q(!1),f.type==="REORDER"){var m=HT({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:c});return m==null?null:$s({draggable:s,insideDestination:c,destination:i,viewport:p,last:l.displaced,displacedBy:l.displacedBy,index:m})}var g=$T({isMovingForward:t,destination:i,displaced:l.displaced,draggables:o,combine:f.combine,afterCritical:u});return g==null?null:$s({draggable:s,insideDestination:c,destination:i,viewport:p,last:l.displaced,displacedBy:l.displacedBy,index:g})},GT=function(e){var t=e.displaced,n=e.afterCritical,s=e.combineWith,o=e.displacedBy,i=Boolean(t.visible[s]||t.invisible[s]);return un(s,n)?i?Xe:Qn(o.point):i?o.point:Xe},UT=function(e){var t=e.afterCritical,n=e.impact,s=e.draggables,o=Ks(n);o||Q(!1);var i=o.draggableId,c=s[i].page.borderBox.center,l=GT({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return nt(c,l)},np=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},YT=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Ro=function(t,n,s){return n[t.crossAxisStart]+s.margin[t.crossAxisStart]+s.borderBox[t.crossAxisSize]/2},ap=function(t){var n=t.axis,s=t.moveRelativeTo,o=t.isMoving;return Nn(n.line,s.marginBox[n.end]+np(n,o),Ro(n,s.marginBox,o))},sp=function(t){var n=t.axis,s=t.moveRelativeTo,o=t.isMoving;return Nn(n.line,s.marginBox[n.start]-YT(n,o),Ro(n,s.marginBox,o))},zT=function(t){var n=t.axis,s=t.moveInto,o=t.isMoving;return Nn(n.line,s.contentBox[n.start]+np(n,o),Ro(n,s.contentBox,o))},jT=function(e){var t=e.impact,n=e.draggable,s=e.draggables,o=e.droppable,i=e.afterCritical,c=ta(o.descriptor.id,s),l=n.page,p=o.axis;if(!c.length)return zT({axis:p,moveInto:o.page,isMoving:l});var u=t.displaced,f=t.displacedBy,m=u.all[0];if(m){var g=s[m];if(un(m,i))return sp({axis:p,moveRelativeTo:g.page,isMoving:l});var S=Rs(g.page,f.point);return sp({axis:p,moveRelativeTo:S,isMoving:l})}var w=c[c.length-1];if(w.descriptor.id===n.descriptor.id)return l.borderBox.center;if(un(w.descriptor.id,i)){var x=Rs(w.page,Qn(i.displacedBy.point));return ap({axis:p,moveRelativeTo:x,isMoving:l})}return ap({axis:p,moveRelativeTo:w.page,isMoving:l})},Lo=function(e,t){var n=e.frame;return n?nt(t,n.scroll.diff.displacement):t},qT=function(t){var n=t.impact,s=t.draggable,o=t.droppable,i=t.draggables,c=t.afterCritical,l=s.page.borderBox.center,p=n.at;return!o||!p?l:p.type==="REORDER"?jT({impact:n,draggable:s,draggables:i,droppable:o,afterCritical:c}):UT({impact:n,draggables:i,afterCritical:c})},Hs=function(e){var t=qT(e),n=e.droppable,s=n?Lo(n,t):t;return s},rp=function(e,t){var n=gt(t,e.scroll.initial),s=Qn(n),o=_t({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),i={frame:o,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:s}}};return i};function op(e,t){return e.map(function(n){return t[n]})}function JT(e,t){for(var n=0;n<t.length;n++){var s=t[n].visible[e];if(s)return s}return null}var ZT=function(e){var t=e.impact,n=e.viewport,s=e.destination,o=e.draggables,i=e.maxScrollChange,c=rp(n,nt(n.scroll.current,i)),l=s.frame?Io(s,nt(s.frame.scroll.current,i)):s,p=t.displaced,u=_a({afterDragging:op(p.all,o),destination:s,displacedBy:t.displacedBy,viewport:c.frame,last:p,forceShouldAnimate:!1}),f=_a({afterDragging:op(p.all,o),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),m={},g={},S=[p,u,f];p.all.forEach(function(x){var E=JT(x,S);if(E){g[x]=E;return}m[x]=!0});var w=ue({},t,{displaced:{all:p.all,invisible:m,visible:g}});return w},XT=function(e,t){return nt(e.scroll.diff.displacement,t)},Oo=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,s=e.viewport,o=XT(s,t),i=gt(o,n.page.borderBox.center);return nt(n.client.borderBox.center,i)},ip=function(e){var t=e.draggable,n=e.destination,s=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,c=e.onlyOnMainAxis,l=c===void 0?!1:c,p=gt(s,t.page.borderBox.center),u=ka(t.page.borderBox,p),f={target:u,destination:n,withDroppableDisplacement:i,viewport:o};return l?PT(f):ep(f)},QT=function(e){var t=e.isMovingForward,n=e.draggable,s=e.destination,o=e.draggables,i=e.previousImpact,c=e.viewport,l=e.previousPageBorderBoxCenter,p=e.previousClientSelection,u=e.afterCritical;if(!s.isEnabled)return null;var f=ta(s.descriptor.id,o),m=na(n,s),g=kT({isMovingForward:t,draggable:n,destination:s,insideDestination:f,previousImpact:i})||WT({isMovingForward:t,isInHomeList:m,draggable:n,draggables:o,destination:s,insideDestination:f,previousImpact:i,viewport:c,afterCritical:u});if(!g)return null;var S=Hs({impact:g,draggable:n,droppable:s,draggables:o,afterCritical:u}),w=ip({draggable:n,destination:s,newPageBorderBoxCenter:S,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(w){var x=Oo({pageBorderBoxCenter:S,draggable:n,viewport:c});return{clientSelection:x,impact:g,scrollJumpRequest:null}}var E=gt(S,l),D=ZT({impact:g,viewport:c,destination:s,draggables:o,maxScrollChange:E});return{clientSelection:p,impact:D,scrollJumpRequest:E}},lt=function(t){var n=t.subject.active;return n||Q(!1),n},ew=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,s=e.source,o=e.droppables,i=e.viewport,c=s.subject.active;if(!c)return null;var l=s.axis,p=Ct(c[l.start],c[l.end]),u=Fs(o).filter(function(m){return m!==s}).filter(function(m){return m.isEnabled}).filter(function(m){return Boolean(m.subject.active)}).filter(function(m){return Xd(i.frame)(lt(m))}).filter(function(m){var g=lt(m);return t?c[l.crossAxisEnd]<g[l.crossAxisEnd]:g[l.crossAxisStart]<c[l.crossAxisStart]}).filter(function(m){var g=lt(m),S=Ct(g[l.start],g[l.end]);return p(g[l.start])||p(g[l.end])||S(c[l.start])||S(c[l.end])}).sort(function(m,g){var S=lt(m)[l.crossAxisStart],w=lt(g)[l.crossAxisStart];return t?S-w:w-S}).filter(function(m,g,S){return lt(m)[l.crossAxisStart]===lt(S[0])[l.crossAxisStart]});if(!u.length)return null;if(u.length===1)return u[0];var f=u.filter(function(m){var g=Ct(lt(m)[l.start],lt(m)[l.end]);return g(n[l.line])});return f.length===1?f[0]:f.length>1?f.sort(function(m,g){return lt(m)[l.start]-lt(g)[l.start]})[0]:u.sort(function(m,g){var S=Ud(n,zd(lt(m))),w=Ud(n,zd(lt(g)));return S!==w?S-w:lt(m)[l.start]-lt(g)[l.start]})[0]},lp=function(t,n){var s=t.page.borderBox.center;return un(t.descriptor.id,n)?gt(s,n.displacedBy.point):s},tw=function(t,n){var s=t.page.borderBox;return un(t.descriptor.id,n)?ka(s,Qn(n.displacedBy.point)):s},nw=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,s=e.destination,o=e.insideDestination,i=e.afterCritical,c=o.filter(function(l){return ep({target:tw(l,i),destination:s,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,p){var u=Na(t,Lo(s,lp(l,i))),f=Na(t,Lo(s,lp(p,i)));return u<f?-1:f<u?1:l.descriptor.index-p.descriptor.index});return c[0]||null},Ra=Ze(function(t,n){var s=n[t.line];return{value:s,point:Nn(t.line,s)}}),aw=function(t,n,s){var o=t.axis;if(t.descriptor.mode==="virtual")return Nn(o.line,n[o.line]);var i=t.subject.page.contentBox[o.size],c=ta(t.descriptor.id,s),l=c.reduce(function(f,m){return f+m.client.marginBox[o.size]},0),p=l+n[o.line],u=p-i;return u<=0?null:Nn(o.line,u)},cp=function(t,n){return ue({},t,{scroll:ue({},t.scroll,{max:n})})},dp=function(t,n,s){var o=t.frame;na(n,t)&&Q(!1),t.subject.withPlaceholder&&Q(!1);var i=Ra(t.axis,n.displaceBy).point,c=aw(t,i,s),l={placeholderSize:i,increasedBy:c,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!o){var p=ea({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:t.frame});return ue({},t,{subject:p})}var u=c?nt(o.scroll.max,c):o.scroll.max,f=cp(o,u),m=ea({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:f});return ue({},t,{subject:m,frame:f})},sw=function(t){var n=t.subject.withPlaceholder;n||Q(!1);var s=t.frame;if(!s){var o=ea({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ue({},t,{subject:o})}var i=n.oldFrameMaxScroll;i||Q(!1);var c=cp(s,i),l=ea({page:t.subject.page,axis:t.axis,frame:c,withPlaceholder:null});return ue({},t,{subject:l,frame:c})},rw=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,s=e.insideDestination,o=e.draggable,i=e.draggables,c=e.destination,l=e.viewport,p=e.afterCritical;if(!n){if(s.length)return null;var u={displaced:Ma,displacedBy:Zd,at:{type:"REORDER",destination:{droppableId:c.descriptor.id,index:0}}},f=Hs({impact:u,draggable:o,droppable:c,draggables:i,afterCritical:p}),m=na(o,c)?c:dp(c,o,i),g=ip({draggable:o,destination:m,newPageBorderBoxCenter:f,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return g?u:null}var S=Boolean(t[c.axis.line]<=n.page.borderBox.center[c.axis.line]),w=function(){var E=n.descriptor.index;return n.descriptor.id===o.descriptor.id||S?E:E+1}(),x=Ra(c.axis,o.displaceBy);return $s({draggable:o,insideDestination:s,destination:c,viewport:l,displacedBy:x,last:Ma,index:w})},ow=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,s=e.draggable,o=e.isOver,i=e.draggables,c=e.droppables,l=e.viewport,p=e.afterCritical,u=ew({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:c,viewport:l});if(!u)return null;var f=ta(u.descriptor.id,i),m=nw({pageBorderBoxCenter:n,viewport:l,destination:u,insideDestination:f,afterCritical:p}),g=rw({previousPageBorderBoxCenter:n,destination:u,draggable:s,draggables:i,moveRelativeTo:m,insideDestination:f,viewport:l,afterCritical:p});if(!g)return null;var S=Hs({impact:g,draggable:s,droppable:u,draggables:i,afterCritical:p}),w=Oo({pageBorderBoxCenter:S,draggable:s,viewport:l});return{clientSelection:w,impact:g,scrollJumpRequest:null}},St=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},iw=function(t,n){var s=St(t);return s?n[s]:null},lw=function(e){var t=e.state,n=e.type,s=iw(t.impact,t.dimensions.droppables),o=Boolean(s),i=t.dimensions.droppables[t.critical.droppable.id],c=s||i,l=c.axis.direction,p=l==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||l==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(p&&!o)return null;var u=n==="MOVE_DOWN"||n==="MOVE_RIGHT",f=t.dimensions.draggables[t.critical.draggable.id],m=t.current.page.borderBoxCenter,g=t.dimensions,S=g.draggables,w=g.droppables;return p?QT({isMovingForward:u,previousPageBorderBoxCenter:m,draggable:f,destination:c,draggables:S,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):ow({isMovingForward:u,previousPageBorderBoxCenter:m,draggable:f,isOver:c,draggables:S,droppables:w,viewport:t.viewport,afterCritical:t.afterCritical})};function kn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function pp(e){var t=Ct(e.top,e.bottom),n=Ct(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function cw(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function dw(e){var t=e.pageBorderBox,n=e.draggable,s=e.candidates,o=n.page.borderBox.center,i=s.map(function(c){var l=c.axis,p=Nn(c.axis.line,t.center[l.line],c.page.borderBox.center[l.crossAxisLine]);return{id:c.descriptor.id,distance:Na(o,p)}}).sort(function(c,l){return l.distance-c.distance});return i[0]?i[0].id:null}function pw(e){var t=e.pageBorderBox,n=e.draggable,s=e.droppables,o=Fs(s).filter(function(i){if(!i.isEnabled)return!1;var c=i.subject.active;if(!c||!cw(t,c))return!1;if(pp(c)(t.center))return!0;var l=i.axis,p=c.center[l.crossAxisLine],u=t[l.crossAxisStart],f=t[l.crossAxisEnd],m=Ct(c[l.crossAxisStart],c[l.crossAxisEnd]),g=m(u),S=m(f);return!g&&!S?!0:g?u<p:f>p});return o.length?o.length===1?o[0].descriptor.id:dw({pageBorderBox:t,draggable:n,candidates:o}):null}var up=function(t,n){return _t(ka(t,n))},uw=function(e,t){var n=e.frame;return n?up(t,n.scroll.diff.value):t};function mp(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}function mw(e){var t=e.draggable,n=e.closest,s=e.inHomeList;return n?s&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var fw=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,s=e.destination,o=e.insideDestination,i=e.last,c=e.viewport,l=e.afterCritical,p=s.axis,u=Ra(s.axis,n.displaceBy),f=u.value,m=t[p.start],g=t[p.end],S=Vs(n,o),w=pn(S,function(E){var D=E.descriptor.id,I=E.page.borderBox.center[p.line],v=un(D,l),N=mp({displaced:i,id:D});return v?N?g<=I:m<I-f:N?g<=I+f:m<I}),x=mw({draggable:n,closest:w,inHomeList:na(n,s)});return $s({draggable:n,insideDestination:o,destination:s,viewport:c,last:i,displacedBy:u,index:x})},hw=4,gw=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,s=e.previousImpact,o=e.destination,i=e.insideDestination,c=e.afterCritical;if(!o.isCombineEnabled)return null;var l=o.axis,p=Ra(o.axis,t.displaceBy),u=p.value,f=n[l.start],m=n[l.end],g=Vs(t,i),S=pn(g,function(x){var E=x.descriptor.id,D=x.page.borderBox,I=D[l.size],v=I/hw,N=un(E,c),_=mp({displaced:s.displaced,id:E});return N?_?m>D[l.start]+v&&m<D[l.end]-v:f>D[l.start]-u+v&&f<D[l.end]-u-v:_?m>D[l.start]+u+v&&m<D[l.end]+u-v:f>D[l.start]+v&&f<D[l.end]-v});if(!S)return null;var w={displacedBy:p,displaced:s.displaced,at:{type:"COMBINE",combine:{draggableId:S.descriptor.id,droppableId:o.descriptor.id}}};return w},fp=function(e){var t=e.pageOffset,n=e.draggable,s=e.draggables,o=e.droppables,i=e.previousImpact,c=e.viewport,l=e.afterCritical,p=up(n.page.borderBox,t),u=pw({pageBorderBox:p,draggable:n,droppables:o});if(!u)return MT;var f=o[u],m=ta(f.descriptor.id,s),g=uw(f,p);return gw({pageBorderBoxWithDroppableScroll:g,draggable:n,previousImpact:i,destination:f,insideDestination:m,afterCritical:l})||fw({pageBorderBoxWithDroppableScroll:g,draggable:n,destination:f,insideDestination:m,last:i.displaced,viewport:c,afterCritical:l})},Bo=function(e,t){var n;return ue({},e,(n={},n[t.descriptor.id]=t,n))},Sw=function(t){var n=t.previousImpact,s=t.impact,o=t.droppables,i=St(n),c=St(s);if(!i||i===c)return o;var l=o[i];if(!l.subject.withPlaceholder)return o;var p=sw(l);return Bo(o,p)},bw=function(e){var t=e.draggable,n=e.draggables,s=e.droppables,o=e.previousImpact,i=e.impact,c=Sw({previousImpact:o,impact:i,droppables:s}),l=St(i);if(!l)return c;var p=s[l];if(na(t,p)||p.subject.withPlaceholder)return c;var u=dp(p,t,n);return Bo(c,u)},La=function(e){var t=e.state,n=e.clientSelection,s=e.dimensions,o=e.viewport,i=e.impact,c=e.scrollJumpRequest,l=o||t.viewport,p=s||t.dimensions,u=n||t.current.client.selection,f=gt(u,t.initial.client.selection),m={offset:f,selection:u,borderBoxCenter:nt(t.initial.client.borderBoxCenter,f)},g={selection:nt(m.selection,l.scroll.current),borderBoxCenter:nt(m.borderBoxCenter,l.scroll.current),offset:nt(m.offset,l.scroll.diff.value)},S={client:m,page:g};if(t.phase==="COLLECTING")return ue({phase:"COLLECTING"},t,{dimensions:p,viewport:l,current:S});var w=p.draggables[t.critical.draggable.id],x=i||fp({pageOffset:g.offset,draggable:w,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),E=bw({draggable:w,impact:x,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),D=ue({},t,{current:S,dimensions:{draggables:p.draggables,droppables:E},impact:x,viewport:l,scrollJumpRequest:c||null,forceShouldAnimate:c?!1:null});return D};function vw(e,t){return e.map(function(n){return t[n]})}var hp=function(e){var t=e.impact,n=e.viewport,s=e.draggables,o=e.destination,i=e.forceShouldAnimate,c=t.displaced,l=vw(c.all,s),p=_a({afterDragging:l,destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:i,last:c});return ue({},t,{displaced:p})},gp=function(e){var t=e.impact,n=e.draggable,s=e.droppable,o=e.draggables,i=e.viewport,c=e.afterCritical,l=Hs({impact:t,draggable:n,draggables:o,droppable:s,afterCritical:c});return Oo({pageBorderBoxCenter:l,draggable:n,viewport:i})},Sp=function(e){var t=e.state,n=e.dimensions,s=e.viewport;t.movementMode!=="SNAP"&&Q(!1);var o=t.impact,i=s||t.viewport,c=n||t.dimensions,l=c.draggables,p=c.droppables,u=l[t.critical.draggable.id],f=St(o);f||Q(!1);var m=p[f],g=hp({impact:o,viewport:i,destination:m,draggables:l}),S=gp({impact:g,draggable:u,droppable:m,draggables:l,viewport:i,afterCritical:t.afterCritical});return La({impact:g,clientSelection:S,state:t,dimensions:c,viewport:i})},yw=function(e){return{index:e.index,droppableId:e.droppableId}},bp=function(e){var t=e.draggable,n=e.home,s=e.draggables,o=e.viewport,i=Ra(n.axis,t.displaceBy),c=ta(n.descriptor.id,s),l=c.indexOf(t);l===-1&&Q(!1);var p=c.slice(l+1),u=p.reduce(function(S,w){return S[w.descriptor.id]=!0,S},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:i,effected:u},m=_a({afterDragging:p,destination:n,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),g={displaced:m,displacedBy:i,at:{type:"REORDER",destination:yw(t.descriptor)}};return{impact:g,afterCritical:f}},Tw=function(e,t){return{draggables:e.draggables,droppables:Bo(e.droppables,t)}},ww=function(e){var t=e.draggable,n=e.offset,s=e.initialWindowScroll,o=Rs(t.client,n),i=Ls(o,s),c=ue({},t,{placeholder:ue({},t.placeholder,{client:o}),client:o,page:i});return c},Ew=function(e){var t=e.frame;return t||Q(!1),t},Cw=function(e){var t=e.additions,n=e.updatedDroppables,s=e.viewport,o=s.scroll.diff.value;return t.map(function(i){var c=i.descriptor.droppableId,l=n[c],p=Ew(l),u=p.scroll.diff.value,f=nt(o,u),m=ww({draggable:i,offset:f,initialWindowScroll:s.scroll.initial});return m})},xw=function(e){var t=e.state,n=e.published,s=n.modified.map(function(v){var N=t.dimensions.droppables[v.droppableId],_=Io(N,v.scroll);return _}),o=ue({},t.dimensions.droppables,{},qd(s)),i=Jd(Cw({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),c=ue({},t.dimensions.draggables,{},i);n.removals.forEach(function(v){delete c[v]});var l={droppables:o,draggables:c},p=St(t.impact),u=p?l.droppables[p]:null,f=l.draggables[t.critical.draggable.id],m=l.droppables[t.critical.droppable.id],g=bp({draggable:f,home:m,draggables:c,viewport:t.viewport}),S=g.impact,w=g.afterCritical,x=u&&u.isCombineEnabled?t.impact:S,E=fp({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:x,viewport:t.viewport,afterCritical:w}),D=ue({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:E,onLiftImpact:S,dimensions:l,afterCritical:w,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return D;var I=ue({phase:"DROP_PENDING"},D,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return I},Ao=function(t){return t.movementMode==="SNAP"},Po=function(t,n,s){var o=Tw(t.dimensions,n);return!Ao(t)||s?La({state:t,dimensions:o}):Sp({state:t,dimensions:o})};function Fo(e){return e.isDragging&&e.movementMode==="SNAP"?ue({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var vp={phase:"IDLE",completed:null,shouldFlush:!1},Dw=function(e,t){if(e===void 0&&(e=vp),t.type==="FLUSH")return ue({},vp,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Q(!1);var n=t.payload,s=n.critical,o=n.clientSelection,i=n.viewport,c=n.dimensions,l=n.movementMode,p=c.draggables[s.draggable.id],u=c.droppables[s.droppable.id],f={selection:o,borderBoxCenter:p.client.borderBox.center,offset:Xe},m={client:f,page:{selection:nt(f.selection,i.scroll.initial),borderBoxCenter:nt(f.selection,i.scroll.initial),offset:nt(f.selection,i.scroll.diff.value)}},g=Fs(c.droppables).every(function($e){return!$e.isFixedOnPage}),S=bp({draggable:p,home:u,draggables:c.draggables,viewport:i}),w=S.impact,x=S.afterCritical,E={phase:"DRAGGING",isDragging:!0,critical:s,movementMode:l,dimensions:c,initial:m,current:m,isWindowScrollAllowed:g,impact:w,afterCritical:x,onLiftImpact:w,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null};return E}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Q(!1);var D=ue({phase:"COLLECTING"},e,{phase:"COLLECTING"});return D}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Q(!1),xw({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;kn(e)||Q(!1);var I=t.payload.client;return dn(I,e.current.client.selection)?e:La({state:e,clientSelection:I,impact:Ao(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Fo(e);kn(e)||Q(!1);var v=t.payload,N=v.id,_=v.newScroll,O=e.dimensions.droppables[N];if(!O)return e;var R=Io(O,_);return Po(e,R,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;kn(e)||Q(!1);var B=t.payload,F=B.id,P=B.isEnabled,U=e.dimensions.droppables[F];U||Q(!1),U.isEnabled===P&&Q(!1);var V=ue({},U,{isEnabled:P});return Po(e,V,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;kn(e)||Q(!1);var W=t.payload,pe=W.id,me=W.isCombineEnabled,re=e.dimensions.droppables[pe];re||Q(!1),re.isCombineEnabled===me&&Q(!1);var se=ue({},re,{isCombineEnabled:me});return Po(e,se,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;kn(e)||Q(!1),e.isWindowScrollAllowed||Q(!1);var j=t.payload.newScroll;if(dn(e.viewport.scroll.current,j))return Fo(e);var Z=rp(e.viewport,j);return Ao(e)?Sp({state:e,viewport:Z}):La({state:e,viewport:Z})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!kn(e))return e;var oe=t.payload.maxScroll;if(dn(oe,e.viewport.scroll.max))return e;var ee=ue({},e.viewport,{scroll:ue({},e.viewport.scroll,{max:oe})});return ue({phase:"DRAGGING"},e,{viewport:ee})}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"&&Q(!1);var te=lw({state:e,type:t.type});return te?La({state:e,impact:te.impact,clientSelection:te.clientSelection,scrollJumpRequest:te.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var X=t.payload.reason;e.phase!=="COLLECTING"&&Q(!1);var le=ue({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:X});return le}if(t.type==="DROP_ANIMATE"){var q=t.payload,ye=q.completed,Ie=q.dropDuration,Ce=q.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Q(!1);var we={phase:"DROP_ANIMATING",completed:ye,dropDuration:Ie,newHomeClientOffset:Ce,dimensions:e.dimensions};return we}if(t.type==="DROP_COMPLETE"){var Ke=t.payload.completed;return{phase:"IDLE",completed:Ke,shouldFlush:!1}}return e},Iw=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},Nw=function(t){return{type:"LIFT",payload:t}},kw=function(t){return{type:"INITIAL_PUBLISH",payload:t}},Mw=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},_w=function(){return{type:"COLLECTION_STARTING",payload:null}},Rw=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},Lw=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},Ow=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},yp=function(t){return{type:"MOVE",payload:t}},Bw=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},Aw=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},Pw=function(){return{type:"MOVE_UP",payload:null}},Fw=function(){return{type:"MOVE_DOWN",payload:null}},Kw=function(){return{type:"MOVE_RIGHT",payload:null}},Vw=function(){return{type:"MOVE_LEFT",payload:null}},Ko=function(){return{type:"FLUSH",payload:null}},$w=function(t){return{type:"DROP_ANIMATE",payload:t}},Vo=function(t){return{type:"DROP_COMPLETE",payload:t}},Tp=function(t){return{type:"DROP",payload:t}},Hw=function(t){return{type:"DROP_PENDING",payload:t}},wp=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},Ww=function(e){return function(t){var n=t.getState,s=t.dispatch;return function(o){return function(i){if(i.type!=="LIFT"){o(i);return}var c=i.payload,l=c.id,p=c.clientSelection,u=c.movementMode,f=n();f.phase==="DROP_ANIMATING"&&s(Vo({completed:f.completed})),n().phase!=="IDLE"&&Q(!1),s(Ko()),s(Iw({draggableId:l,movementMode:u}));var m={shouldPublishImmediately:u==="SNAP"},g={draggableId:l,scrollOptions:m},S=e.startPublishing(g),w=S.critical,x=S.dimensions,E=S.viewport;s(kw({critical:w,dimensions:x,clientSelection:p,movementMode:u,viewport:E}))}}}},Gw=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)}}}},$o={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Oa={opacity:{drop:0,combining:.7},scale:{drop:.75}},Ho={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Mn=Ho.outOfTheWay+"s "+$o.outOfTheWay,Ba={fluid:"opacity "+Mn,snap:"transform "+Mn+", opacity "+Mn,drop:function(t){var n=t+"s "+$o.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Mn,placeholder:"height "+Mn+", width "+Mn+", margin "+Mn},Ep=function(t){return dn(t,Xe)?null:"translate("+t.x+"px, "+t.y+"px)"},Wo={moveTo:Ep,drop:function(t,n){var s=Ep(t);return s?n?s+" scale("+Oa.scale.drop+")":s:null}},Go=Ho.minDropTime,Cp=Ho.maxDropTime,Uw=Cp-Go,xp=1500,Yw=.6,zw=function(e){var t=e.current,n=e.destination,s=e.reason,o=Na(t,n);if(o<=0)return Go;if(o>=xp)return Cp;var i=o/xp,c=Go+Uw*i,l=s==="CANCEL"?c*Yw:c;return Number(l.toFixed(2))},jw=function(e){var t=e.impact,n=e.draggable,s=e.dimensions,o=e.viewport,i=e.afterCritical,c=s.draggables,l=s.droppables,p=St(t),u=p?l[p]:null,f=l[n.descriptor.droppableId],m=gp({impact:t,draggable:n,draggables:c,afterCritical:i,droppable:u||f,viewport:o}),g=gt(m,n.client.borderBox.center);return g},qw=function(e){var t=e.draggables,n=e.reason,s=e.lastImpact,o=e.home,i=e.viewport,c=e.onLiftImpact;if(!s.at||n!=="DROP"){var l=hp({draggables:t,impact:c,destination:o,viewport:i,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(s.at.type==="REORDER")return{impact:s,didDropInsideDroppable:!0};var p=ue({},s,{displaced:Ma});return{impact:p,didDropInsideDroppable:!0}},Jw=function(e){var t=e.getState,n=e.dispatch;return function(s){return function(o){if(o.type!=="DROP"){s(o);return}var i=t(),c=o.payload.reason;if(i.phase==="COLLECTING"){n(Hw({reason:c}));return}if(i.phase!=="IDLE"){var l=i.phase==="DROP_PENDING"&&i.isWaiting;l&&Q(!1),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||Q(!1);var p=i.critical,u=i.dimensions,f=u.draggables[i.critical.draggable.id],m=qw({reason:c,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),g=m.impact,S=m.didDropInsideDroppable,w=S?ko(g):null,x=S?Ks(g):null,E={index:p.draggable.index,droppableId:p.droppable.id},D={draggableId:f.descriptor.id,type:f.descriptor.type,source:E,reason:c,mode:i.movementMode,destination:w,combine:x},I=jw({impact:g,draggable:f,dimensions:u,viewport:i.viewport,afterCritical:i.afterCritical}),v={critical:i.critical,afterCritical:i.afterCritical,result:D,impact:g},N=!dn(i.current.client.offset,I)||Boolean(D.combine);if(!N){n(Vo({completed:v}));return}var _=zw({current:i.current.client.offset,destination:I,reason:c}),O={newHomeClientOffset:I,dropDuration:_,completed:v};n($w(O))}}}},Dp=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Zw(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function Xw(e){var t=e.onWindowScroll;function n(){t(Dp())}var s=Ia(n),o=Zw(s),i=cn;function c(){return i!==cn}function l(){c()&&Q(!1),i=Et(window,[o])}function p(){c()||Q(!1),s.cancel(),i(),i=cn}return{start:l,stop:p,isActive:c}}var Qw=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},eE=function(e){var t=Xw({onWindowScroll:function(s){e.dispatch(Bw({newScroll:s}))}});return function(n){return function(s){!t.isActive()&&s.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Qw(s)&&t.stop(),n(s)}}},tE=function(e){var t=!1,n=!1,s=setTimeout(function(){n=!0}),o=function(c){t||n||(t=!0,e(c),clearTimeout(s))};return o.wasCalled=function(){return t},o},nE=function(){var e=[],t=function(i){var c=No(e,function(u){return u.timerId===i});c===-1&&Q(!1);var l=e.splice(c,1),p=l[0];p.callback()},n=function(i){var c=setTimeout(function(){return t(c)}),l={timerId:c,callback:i};e.push(l)},s=function(){if(!!e.length){var i=[].concat(e);e.length=0,i.forEach(function(c){clearTimeout(c.timerId),c.callback()})}};return{add:n,flush:s}},aE=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},sE=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},rE=function(t,n){if(t===n)return!0;var s=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,o=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return s&&o},Aa=function(t,n){n()},Ws=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},Uo=function(t,n,s,o){if(!t){s(o(n));return}var i=tE(s),c={announce:i};t(n,c),i.wasCalled()||s(o(n))},oE=function(e,t){var n=nE(),s=null,o=function(g,S){s&&Q(!1),Aa("onBeforeCapture",function(){var w=e().onBeforeCapture;if(w){var x={draggableId:g,mode:S};w(x)}})},i=function(g,S){s&&Q(!1),Aa("onBeforeDragStart",function(){var w=e().onBeforeDragStart;w&&w(Ws(g,S))})},c=function(g,S){s&&Q(!1);var w=Ws(g,S);s={mode:S,lastCritical:g,lastLocation:w.source,lastCombine:null},n.add(function(){Aa("onDragStart",function(){return Uo(e().onDragStart,w,t,As.onDragStart)})})},l=function(g,S){var w=ko(S),x=Ks(S);s||Q(!1);var E=!rE(g,s.lastCritical);E&&(s.lastCritical=g);var D=!aE(s.lastLocation,w);D&&(s.lastLocation=w);var I=!sE(s.lastCombine,x);if(I&&(s.lastCombine=x),!(!E&&!D&&!I)){var v=ue({},Ws(g,s.mode),{combine:x,destination:w});n.add(function(){Aa("onDragUpdate",function(){return Uo(e().onDragUpdate,v,t,As.onDragUpdate)})})}},p=function(){s||Q(!1),n.flush()},u=function(g){s||Q(!1),s=null,Aa("onDragEnd",function(){return Uo(e().onDragEnd,g,t,As.onDragEnd)})},f=function(){if(!!s){var g=ue({},Ws(s.lastCritical,s.mode),{combine:null,destination:null,reason:"CANCEL"});u(g)}};return{beforeCapture:o,beforeStart:i,start:c,update:l,flush:p,drop:u,abort:f}},iE=function(e,t){var n=oE(e,t);return function(s){return function(o){return function(i){if(i.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(i.type==="INITIAL_PUBLISH"){var c=i.payload.critical;n.beforeStart(c,i.payload.movementMode),o(i),n.start(c,i.payload.movementMode);return}if(i.type==="DROP_COMPLETE"){var l=i.payload.completed.result;n.flush(),o(i),n.drop(l);return}if(o(i),i.type==="FLUSH"){n.abort();return}var p=s.getState();p.phase==="DRAGGING"&&n.update(p.critical,p.impact)}}}},lE=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var s=e.getState();s.phase!=="DROP_ANIMATING"&&Q(!1),e.dispatch(Vo({completed:s.completed}))}}},cE=function(e){var t=null,n=null;function s(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(o){return function(i){if((i.type==="FLUSH"||i.type==="DROP_COMPLETE"||i.type==="DROP_ANIMATION_FINISHED")&&s(),o(i),i.type==="DROP_ANIMATE"){var c={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var p=e.getState();p.phase==="DROP_ANIMATING"&&e.dispatch(wp())}};n=requestAnimationFrame(function(){n=null,t=Et(window,[c])})}}}},dE=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)}}}},pE=function(e){var t=!1;return function(){return function(n){return function(s){if(s.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(s.payload.critical.draggable.id),n(s),e.tryRestoreFocusRecorded();return}if(n(s),!!t){if(s.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(s.type==="DROP_COMPLETE"){t=!1;var o=s.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},uE=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},mE=function(e){return function(t){return function(n){return function(s){if(uE(s)){e.stop(),n(s);return}if(s.type==="INITIAL_PUBLISH"){n(s);var o=t.getState();o.phase!=="DRAGGING"&&Q(!1),e.start(o);return}n(s),e.scroll(t.getState())}}}},fE=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var s=e.getState();s.phase==="DROP_PENDING"&&(s.isWaiting||e.dispatch(Tp({reason:s.reason})))}}}},hE=Sd,gE=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,s=e.styleMarshal,o=e.getResponders,i=e.announce,c=e.autoScroller;return fd(Dw,hE(fy(Gw(s),dE(t),Ww(t),Jw,lE,cE,fE,mE(c),eE,pE(n),iE(o,i))))},Yo=function(){return{additions:{},removals:{},modified:{}}};function SE(e){var t=e.registry,n=e.callbacks,s=Yo(),o=null,i=function(){o||(n.collectionStarting(),o=requestAnimationFrame(function(){o=null;var f=s,m=f.additions,g=f.removals,S=f.modified,w=Object.keys(m).map(function(D){return t.draggable.getById(D).getDimension(Xe)}).sort(function(D,I){return D.descriptor.index-I.descriptor.index}),x=Object.keys(S).map(function(D){var I=t.droppable.getById(D),v=I.callbacks.getScrollWhileDragging();return{droppableId:D,scroll:v}}),E={additions:w,removals:Object.keys(g),modified:x};s=Yo(),n.publish(E)}))},c=function(f){var m=f.descriptor.id;s.additions[m]=f,s.modified[f.descriptor.droppableId]=!0,s.removals[m]&&delete s.removals[m],i()},l=function(f){var m=f.descriptor;s.removals[m.id]=!0,s.modified[m.droppableId]=!0,s.additions[m.id]&&delete s.additions[m.id],i()},p=function(){!o||(cancelAnimationFrame(o),o=null,s=Yo())};return{add:c,remove:l,stop:p}}var Ip=function(e){var t=e.scrollHeight,n=e.scrollWidth,s=e.height,o=e.width,i=gt({x:n,y:t},{x:o,y:s}),c={x:Math.max(0,i.x),y:Math.max(0,i.y)};return c},Np=function(){var e=document.documentElement;return e||Q(!1),e},kp=function(){var e=Np(),t=Ip({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},bE=function(){var e=Dp(),t=kp(),n=e.y,s=e.x,o=Np(),i=o.clientWidth,c=o.clientHeight,l=s+i,p=n+c,u=_t({top:n,left:s,right:l,bottom:p}),f={frame:u,scroll:{initial:e,current:e,max:t,diff:{value:Xe,displacement:Xe}}};return f},vE=function(e){var t=e.critical,n=e.scrollOptions,s=e.registry,o=bE(),i=o.scroll.current,c=t.droppable,l=s.droppable.getAllByType(c.type).map(function(m){return m.callbacks.getDimensionAndWatchScroll(i,n)}),p=s.draggable.getAllByType(t.draggable.type).map(function(m){return m.getDimension(i)}),u={draggables:Jd(p),droppables:qd(l)},f={dimensions:u,critical:t,viewport:o};return f};function Mp(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var s=e.droppable.getById(n.descriptor.droppableId);return s.descriptor.mode==="virtual"}var yE=function(e,t){var n=null,s=SE({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(S,w){e.droppable.exists(S)||Q(!1),!!n&&t.updateDroppableIsEnabled({id:S,isEnabled:w})},i=function(S,w){!n||(e.droppable.exists(S)||Q(!1),t.updateDroppableIsCombineEnabled({id:S,isCombineEnabled:w}))},c=function(S,w){!n||(e.droppable.exists(S)||Q(!1),t.updateDroppableScroll({id:S,newScroll:w}))},l=function(S,w){!n||e.droppable.getById(S).callbacks.scroll(w)},p=function(){if(!!n){s.stop();var S=n.critical.droppable;e.droppable.getAllByType(S.type).forEach(function(w){return w.callbacks.dragStopped()}),n.unsubscribe(),n=null}},u=function(S){n||Q(!1);var w=n.critical.draggable;S.type==="ADDITION"&&Mp(e,w,S.value)&&s.add(S.value),S.type==="REMOVAL"&&Mp(e,w,S.value)&&s.remove(S.value)},f=function(S){n&&Q(!1);var w=e.draggable.getById(S.draggableId),x=e.droppable.getById(w.descriptor.droppableId),E={draggable:w.descriptor,droppable:x.descriptor},D=e.subscribe(u);return n={critical:E,unsubscribe:D},vE({critical:E,registry:e,scrollOptions:S.scrollOptions})},m={updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:l,updateDroppableScroll:c,startPublishing:f,stopPublishing:p};return m},_p=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},TE=function(e){window.scrollBy(e.x,e.y)},wE=Ze(function(e){return Fs(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),EE=function(t,n){var s=pn(wE(n),function(o){return o.frame||Q(!1),pp(o.frame.pageMarginBox)(t)});return s},CE=function(e){var t=e.center,n=e.destination,s=e.droppables;if(n){var o=s[n];return o.frame?o:null}var i=EE(t,s);return i},mn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},xE=function(e,t){var n=e[t.size]*mn.startFromPercentage,s=e[t.size]*mn.maxScrollAtPercentage,o={startScrollingFrom:n,maxScrollValueAt:s};return o},Rp=function(e){var t=e.startOfRange,n=e.endOfRange,s=e.current,o=n-t;if(o===0)return 0;var i=s-t,c=i/o;return c},zo=1,DE=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return mn.maxPixelScroll;if(e===t.startScrollingFrom)return zo;var n=Rp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),s=1-n,o=mn.maxPixelScroll*mn.ease(s);return Math.ceil(o)},Lp=mn.durationDampening.accelerateAt,Op=mn.durationDampening.stopDampeningAt,IE=function(e,t){var n=t,s=Op,o=Date.now(),i=o-n;if(i>=Op)return e;if(i<Lp)return zo;var c=Rp({startOfRange:Lp,endOfRange:s,current:i}),l=e*mn.ease(c);return Math.ceil(l)},Bp=function(e){var t=e.distanceToEdge,n=e.thresholds,s=e.dragStartTime,o=e.shouldUseTimeDampening,i=DE(t,n);return i===0?0:o?Math.max(IE(i,s),zo):i},Ap=function(e){var t=e.container,n=e.distanceToEdges,s=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,c=xE(t,o),l=n[o.end]<n[o.start];return l?Bp({distanceToEdge:n[o.end],thresholds:c,dragStartTime:s,shouldUseTimeDampening:i}):-1*Bp({distanceToEdge:n[o.start],thresholds:c,dragStartTime:s,shouldUseTimeDampening:i})},NE=function(e){var t=e.container,n=e.subject,s=e.proposedScroll,o=n.height>t.height,i=n.width>t.width;return!i&&!o?s:i&&o?null:{x:i?0:s.x,y:o?0:s.y}},kE=Yd(function(e){return e===0?0:e}),Pp=function(e){var t=e.dragStartTime,n=e.container,s=e.subject,o=e.center,i=e.shouldUseTimeDampening,c={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},l=Ap({container:n,distanceToEdges:c,dragStartTime:t,axis:Mo,shouldUseTimeDampening:i}),p=Ap({container:n,distanceToEdges:c,dragStartTime:t,axis:Qd,shouldUseTimeDampening:i}),u=kE({x:p,y:l});if(dn(u,Xe))return null;var f=NE({container:n,subject:s,proposedScroll:u});return f?dn(f,Xe)?null:f:null},ME=Yd(function(e){return e===0?0:e>0?1:-1}),jo=function(){var e=function(n,s){return n<0?n:n>s?n-s:0};return function(t){var n=t.current,s=t.max,o=t.change,i=nt(n,o),c={x:e(i.x,s.x),y:e(i.y,s.y)};return dn(c,Xe)?null:c}}(),Fp=function(t){var n=t.max,s=t.current,o=t.change,i={x:Math.max(s.x,n.x),y:Math.max(s.y,n.y)},c=ME(o),l=jo({max:i,current:s,change:c});return!l||c.x!==0&&l.x===0||c.y!==0&&l.y===0},qo=function(t,n){return Fp({current:t.scroll.current,max:t.scroll.max,change:n})},_E=function(t,n){if(!qo(t,n))return null;var s=t.scroll.max,o=t.scroll.current;return jo({current:o,max:s,change:n})},Jo=function(t,n){var s=t.frame;return s?Fp({current:s.scroll.current,max:s.scroll.max,change:n}):!1},RE=function(t,n){var s=t.frame;return!s||!Jo(t,n)?null:jo({current:s.scroll.current,max:s.scroll.max,change:n})},LE=function(e){var t=e.viewport,n=e.subject,s=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,c=Pp({dragStartTime:o,container:t.frame,subject:n,center:s,shouldUseTimeDampening:i});return c&&qo(t,c)?c:null},OE=function(e){var t=e.droppable,n=e.subject,s=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,c=t.frame;if(!c)return null;var l=Pp({dragStartTime:o,container:c.pageMarginBox,subject:n,center:s,shouldUseTimeDampening:i});return l&&Jo(t,l)?l:null},Kp=function(e){var t=e.state,n=e.dragStartTime,s=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,c=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],p=l.page.marginBox;if(t.isWindowScrollAllowed){var u=t.viewport,f=LE({dragStartTime:n,viewport:u,subject:p,center:c,shouldUseTimeDampening:s});if(f){o(f);return}}var m=CE({center:c,destination:St(t.impact),droppables:t.dimensions.droppables});if(!!m){var g=OE({dragStartTime:n,droppable:m,subject:p,center:c,shouldUseTimeDampening:s});g&&i(m.descriptor.id,g)}},BE=function(e){var t=e.scrollWindow,n=e.scrollDroppable,s=Ia(t),o=Ia(n),i=null,c=function(f){i||Q(!1);var m=i,g=m.shouldUseTimeDampening,S=m.dragStartTime;Kp({state:f,scrollWindow:s,scrollDroppable:o,dragStartTime:S,shouldUseTimeDampening:g})},l=function(f){i&&Q(!1);var m=Date.now(),g=!1,S=function(){g=!0};Kp({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:S,scrollDroppable:S}),i={dragStartTime:m,shouldUseTimeDampening:g},g&&c(f)},p=function(){!i||(s.cancel(),o.cancel(),i=null)};return{start:l,stop:p,scroll:c}},AE=function(e){var t=e.move,n=e.scrollDroppable,s=e.scrollWindow,o=function(u,f){var m=nt(u.current.client.selection,f);t({client:m})},i=function(u,f){if(!Jo(u,f))return f;var m=RE(u,f);if(!m)return n(u.descriptor.id,f),null;var g=gt(f,m);n(u.descriptor.id,g);var S=gt(f,g);return S},c=function(u,f,m){if(!u||!qo(f,m))return m;var g=_E(f,m);if(!g)return s(m),null;var S=gt(m,g);s(S);var w=gt(m,S);return w},l=function(u){var f=u.scrollJumpRequest;if(!!f){var m=St(u.impact);m||Q(!1);var g=i(u.dimensions.droppables[m],f);if(!!g){var S=u.viewport,w=c(u.isWindowScrollAllowed,S,g);!w||o(u,w)}}};return l},PE=function(e){var t=e.scrollDroppable,n=e.scrollWindow,s=e.move,o=BE({scrollWindow:n,scrollDroppable:t}),i=AE({move:s,scrollWindow:n,scrollDroppable:t}),c=function(u){if(u.phase==="DRAGGING"){if(u.movementMode==="FLUID"){o.scroll(u);return}!u.scrollJumpRequest||i(u)}},l={scroll:c,start:o.start,stop:o.stop};return l},aa="data-rbd",sa=function(){var e=aa+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Zo=function(){var e=aa+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),FE=function(){var e=aa+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Vp={contextId:aa+"-scroll-container-context-id"},KE=function(t){return function(n){return"["+n+'="'+t+'"]'}},Pa=function(t,n){return t.map(function(s){var o=s.styles[n];return o?s.selector+" { "+o+" }":""}).join(" ")},VE="pointer-events: none;",$E=function(e){var t=KE(e),n=function(){var l=`
|
|
1076
|
+
`},As={dragHandleUsageInstructions:vT,onDragStart:yT,onDragUpdate:TT,onDragEnd:wT},Xe={x:0,y:0},nt=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},gt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},dn=function(t,n){return t.x===n.x&&t.y===n.y},Qn=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Nn=function(t,n,s){var o;return s===void 0&&(s=0),o={},o[t]=n,o[t==="x"?"y":"x"]=s,o},Na=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},Ud=function(t,n){return Math.min.apply(Math,n.map(function(s){return Na(t,s)}))},Yd=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},ET=function(e,t){var n=_t({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},ka=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},zd=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}]},CT={top:0,right:0,bottom:0,left:0},xT=function(t,n){return n?ka(t,n.scroll.diff.displacement):t},DT=function(t,n,s){if(s&&s.increasedBy){var o;return ue({},t,(o={},o[n.end]=t[n.end]+s.increasedBy[n.line],o))}return t},IT=function(t,n){return n&&n.shouldClipSubject?ET(n.pageMarginBox,t):_t(t)},ea=function(e){var t=e.page,n=e.withPlaceholder,s=e.axis,o=e.frame,i=xT(t.marginBox,o),c=DT(i,s,n),l=IT(c,o);return{page:t,withPlaceholder:n,active:l}},Io=function(e,t){e.frame||Q(!1);var n=e.frame,s=gt(t,n.scroll.initial),o=Qn(s),i=ue({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:s,displacement:o},max:n.scroll.max}}),c=ea({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i}),l=ue({},e,{frame:i,subject:c});return l};function Ps(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function No(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 pn(e,t){if(e.find)return e.find(t);var n=No(e,t);if(n!==-1)return e[n]}function jd(e){return Array.prototype.slice.call(e)}var qd=Ze(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Jd=Ze(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Fs=Ze(function(e){return Ps(e)}),NT=Ze(function(e){return Ps(e)}),ta=Ze(function(e,t){var n=NT(t).filter(function(s){return e===s.descriptor.droppableId}).sort(function(s,o){return s.descriptor.index-o.descriptor.index});return n});function ko(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Ks(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Vs=Ze(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),kT=function(e){var t=e.isMovingForward,n=e.draggable,s=e.destination,o=e.insideDestination,i=e.previousImpact;if(!s.isCombineEnabled)return null;var c=ko(i);if(!c)return null;function l(x){var C={type:"COMBINE",combine:{draggableId:x,droppableId:s.descriptor.id}};return ue({},i,{at:C})}var p=i.displaced.all,u=p.length?p[0]:null;if(t)return u?l(u):null;var f=Vs(n,o);if(!u){if(!f.length)return null;var m=f[f.length-1];return l(m.descriptor.id)}var g=No(f,function(x){return x.descriptor.id===u});g===-1&&Q(!1);var S=g-1;if(S<0)return null;var w=f[S];return l(w.descriptor.id)},na=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Zd={point:Xe,value:0},Ma={invisible:{},visible:{},all:[]},MT={displaced:Ma,displacedBy:Zd,at:null},Ct=function(e,t){return function(n){return e<=n&&n<=t}},Xd=function(e){var t=Ct(e.top,e.bottom),n=Ct(e.left,e.right);return function(s){var o=t(s.top)&&t(s.bottom)&&n(s.left)&&n(s.right);if(o)return!0;var i=t(s.top)||t(s.bottom),c=n(s.left)||n(s.right),l=i&&c;if(l)return!0;var p=s.top<e.top&&s.bottom>e.bottom,u=s.left<e.left&&s.right>e.right,f=p&&u;if(f)return!0;var m=p&&c||u&&i;return m}},_T=function(e){var t=Ct(e.top,e.bottom),n=Ct(e.left,e.right);return function(s){var o=t(s.top)&&t(s.bottom)&&n(s.left)&&n(s.right);return o}},Mo={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Qd={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},RT=function(e){return function(t){var n=Ct(t.top,t.bottom),s=Ct(t.left,t.right);return function(o){return e===Mo?n(o.top)&&n(o.bottom):s(o.left)&&s(o.right)}}},LT=function(t,n){var s=n.frame?n.frame.scroll.diff.displacement:Xe;return ka(t,s)},OT=function(t,n,s){return n.subject.active?s(n.subject.active)(t):!1},BT=function(t,n,s){return s(n)(t)},_o=function(t){var n=t.target,s=t.destination,o=t.viewport,i=t.withDroppableDisplacement,c=t.isVisibleThroughFrameFn,l=i?LT(n,s):n;return OT(l,s,c)&&BT(l,o,c)},AT=function(t){return _o(ue({},t,{isVisibleThroughFrameFn:Xd}))},ep=function(t){return _o(ue({},t,{isVisibleThroughFrameFn:_T}))},PT=function(t){return _o(ue({},t,{isVisibleThroughFrameFn:RT(t.destination.axis)}))},FT=function(t,n,s){if(typeof s=="boolean")return s;if(!n)return!0;var o=n.invisible,i=n.visible;if(o[t])return!1;var c=i[t];return c?c.shouldAnimate:!0};function KT(e,t){var n=e.page.marginBox,s={top:t.point.y,right:0,bottom:0,left:t.point.x};return _t(Co(n,s))}function _a(e){var t=e.afterDragging,n=e.destination,s=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,c=e.last;return t.reduce(function(p,u){var f=KT(u,s),m=u.descriptor.id;p.all.push(m);var g=AT({target:f,destination:n,viewport:o,withDroppableDisplacement:!0});if(!g)return p.invisible[u.descriptor.id]=!0,p;var S=FT(m,c,i),w={draggableId:m,shouldAnimate:S};return p.visible[m]=w,p},{all:[],visible:{},invisible:{}})}function VT(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function tp(e){var t=e.insideDestination,n=e.inHomeList,s=e.displacedBy,o=e.destination,i=VT(t,{inHomeList:n});return{displaced:Ma,displacedBy:s,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function $s(e){var t=e.draggable,n=e.insideDestination,s=e.destination,o=e.viewport,i=e.displacedBy,c=e.last,l=e.index,p=e.forceShouldAnimate,u=na(t,s);if(l==null)return tp({insideDestination:n,inHomeList:u,displacedBy:i,destination:s});var f=pn(n,function(x){return x.descriptor.index===l});if(!f)return tp({insideDestination:n,inHomeList:u,displacedBy:i,destination:s});var m=Vs(t,n),g=n.indexOf(f),S=m.slice(g),w=_a({afterDragging:S,destination:s,displacedBy:i,last:c,viewport:o.frame,forceShouldAnimate:p});return{displaced:w,displacedBy:i,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:l}}}}function un(e,t){return Boolean(t.effected[e])}var $T=function(e){var t=e.isMovingForward,n=e.destination,s=e.draggables,o=e.combine,i=e.afterCritical;if(!n.isCombineEnabled)return null;var c=o.draggableId,l=s[c],p=l.descriptor.index,u=un(c,i);return u?t?p:p-1:t?p+1:p},HT=function(e){var t=e.isMovingForward,n=e.isInHomeList,s=e.insideDestination,o=e.location;if(!s.length)return null;var i=o.index,c=t?i+1:i-1,l=s[0].descriptor.index,p=s[s.length-1].descriptor.index,u=n?p:p+1;return c<l||c>u?null:c},WT=function(e){var t=e.isMovingForward,n=e.isInHomeList,s=e.draggable,o=e.draggables,i=e.destination,c=e.insideDestination,l=e.previousImpact,p=e.viewport,u=e.afterCritical,f=l.at;if(f||Q(!1),f.type==="REORDER"){var m=HT({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:c});return m==null?null:$s({draggable:s,insideDestination:c,destination:i,viewport:p,last:l.displaced,displacedBy:l.displacedBy,index:m})}var g=$T({isMovingForward:t,destination:i,displaced:l.displaced,draggables:o,combine:f.combine,afterCritical:u});return g==null?null:$s({draggable:s,insideDestination:c,destination:i,viewport:p,last:l.displaced,displacedBy:l.displacedBy,index:g})},GT=function(e){var t=e.displaced,n=e.afterCritical,s=e.combineWith,o=e.displacedBy,i=Boolean(t.visible[s]||t.invisible[s]);return un(s,n)?i?Xe:Qn(o.point):i?o.point:Xe},UT=function(e){var t=e.afterCritical,n=e.impact,s=e.draggables,o=Ks(n);o||Q(!1);var i=o.draggableId,c=s[i].page.borderBox.center,l=GT({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return nt(c,l)},np=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},YT=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Ro=function(t,n,s){return n[t.crossAxisStart]+s.margin[t.crossAxisStart]+s.borderBox[t.crossAxisSize]/2},ap=function(t){var n=t.axis,s=t.moveRelativeTo,o=t.isMoving;return Nn(n.line,s.marginBox[n.end]+np(n,o),Ro(n,s.marginBox,o))},sp=function(t){var n=t.axis,s=t.moveRelativeTo,o=t.isMoving;return Nn(n.line,s.marginBox[n.start]-YT(n,o),Ro(n,s.marginBox,o))},zT=function(t){var n=t.axis,s=t.moveInto,o=t.isMoving;return Nn(n.line,s.contentBox[n.start]+np(n,o),Ro(n,s.contentBox,o))},jT=function(e){var t=e.impact,n=e.draggable,s=e.draggables,o=e.droppable,i=e.afterCritical,c=ta(o.descriptor.id,s),l=n.page,p=o.axis;if(!c.length)return zT({axis:p,moveInto:o.page,isMoving:l});var u=t.displaced,f=t.displacedBy,m=u.all[0];if(m){var g=s[m];if(un(m,i))return sp({axis:p,moveRelativeTo:g.page,isMoving:l});var S=Rs(g.page,f.point);return sp({axis:p,moveRelativeTo:S,isMoving:l})}var w=c[c.length-1];if(w.descriptor.id===n.descriptor.id)return l.borderBox.center;if(un(w.descriptor.id,i)){var x=Rs(w.page,Qn(i.displacedBy.point));return ap({axis:p,moveRelativeTo:x,isMoving:l})}return ap({axis:p,moveRelativeTo:w.page,isMoving:l})},Lo=function(e,t){var n=e.frame;return n?nt(t,n.scroll.diff.displacement):t},qT=function(t){var n=t.impact,s=t.draggable,o=t.droppable,i=t.draggables,c=t.afterCritical,l=s.page.borderBox.center,p=n.at;return!o||!p?l:p.type==="REORDER"?jT({impact:n,draggable:s,draggables:i,droppable:o,afterCritical:c}):UT({impact:n,draggables:i,afterCritical:c})},Hs=function(e){var t=qT(e),n=e.droppable,s=n?Lo(n,t):t;return s},rp=function(e,t){var n=gt(t,e.scroll.initial),s=Qn(n),o=_t({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),i={frame:o,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:s}}};return i};function op(e,t){return e.map(function(n){return t[n]})}function JT(e,t){for(var n=0;n<t.length;n++){var s=t[n].visible[e];if(s)return s}return null}var ZT=function(e){var t=e.impact,n=e.viewport,s=e.destination,o=e.draggables,i=e.maxScrollChange,c=rp(n,nt(n.scroll.current,i)),l=s.frame?Io(s,nt(s.frame.scroll.current,i)):s,p=t.displaced,u=_a({afterDragging:op(p.all,o),destination:s,displacedBy:t.displacedBy,viewport:c.frame,last:p,forceShouldAnimate:!1}),f=_a({afterDragging:op(p.all,o),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),m={},g={},S=[p,u,f];p.all.forEach(function(x){var C=JT(x,S);if(C){g[x]=C;return}m[x]=!0});var w=ue({},t,{displaced:{all:p.all,invisible:m,visible:g}});return w},XT=function(e,t){return nt(e.scroll.diff.displacement,t)},Oo=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,s=e.viewport,o=XT(s,t),i=gt(o,n.page.borderBox.center);return nt(n.client.borderBox.center,i)},ip=function(e){var t=e.draggable,n=e.destination,s=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,c=e.onlyOnMainAxis,l=c===void 0?!1:c,p=gt(s,t.page.borderBox.center),u=ka(t.page.borderBox,p),f={target:u,destination:n,withDroppableDisplacement:i,viewport:o};return l?PT(f):ep(f)},QT=function(e){var t=e.isMovingForward,n=e.draggable,s=e.destination,o=e.draggables,i=e.previousImpact,c=e.viewport,l=e.previousPageBorderBoxCenter,p=e.previousClientSelection,u=e.afterCritical;if(!s.isEnabled)return null;var f=ta(s.descriptor.id,o),m=na(n,s),g=kT({isMovingForward:t,draggable:n,destination:s,insideDestination:f,previousImpact:i})||WT({isMovingForward:t,isInHomeList:m,draggable:n,draggables:o,destination:s,insideDestination:f,previousImpact:i,viewport:c,afterCritical:u});if(!g)return null;var S=Hs({impact:g,draggable:n,droppable:s,draggables:o,afterCritical:u}),w=ip({draggable:n,destination:s,newPageBorderBoxCenter:S,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(w){var x=Oo({pageBorderBoxCenter:S,draggable:n,viewport:c});return{clientSelection:x,impact:g,scrollJumpRequest:null}}var C=gt(S,l),D=ZT({impact:g,viewport:c,destination:s,draggables:o,maxScrollChange:C});return{clientSelection:p,impact:D,scrollJumpRequest:C}},lt=function(t){var n=t.subject.active;return n||Q(!1),n},ew=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,s=e.source,o=e.droppables,i=e.viewport,c=s.subject.active;if(!c)return null;var l=s.axis,p=Ct(c[l.start],c[l.end]),u=Fs(o).filter(function(m){return m!==s}).filter(function(m){return m.isEnabled}).filter(function(m){return Boolean(m.subject.active)}).filter(function(m){return Xd(i.frame)(lt(m))}).filter(function(m){var g=lt(m);return t?c[l.crossAxisEnd]<g[l.crossAxisEnd]:g[l.crossAxisStart]<c[l.crossAxisStart]}).filter(function(m){var g=lt(m),S=Ct(g[l.start],g[l.end]);return p(g[l.start])||p(g[l.end])||S(c[l.start])||S(c[l.end])}).sort(function(m,g){var S=lt(m)[l.crossAxisStart],w=lt(g)[l.crossAxisStart];return t?S-w:w-S}).filter(function(m,g,S){return lt(m)[l.crossAxisStart]===lt(S[0])[l.crossAxisStart]});if(!u.length)return null;if(u.length===1)return u[0];var f=u.filter(function(m){var g=Ct(lt(m)[l.start],lt(m)[l.end]);return g(n[l.line])});return f.length===1?f[0]:f.length>1?f.sort(function(m,g){return lt(m)[l.start]-lt(g)[l.start]})[0]:u.sort(function(m,g){var S=Ud(n,zd(lt(m))),w=Ud(n,zd(lt(g)));return S!==w?S-w:lt(m)[l.start]-lt(g)[l.start]})[0]},lp=function(t,n){var s=t.page.borderBox.center;return un(t.descriptor.id,n)?gt(s,n.displacedBy.point):s},tw=function(t,n){var s=t.page.borderBox;return un(t.descriptor.id,n)?ka(s,Qn(n.displacedBy.point)):s},nw=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,s=e.destination,o=e.insideDestination,i=e.afterCritical,c=o.filter(function(l){return ep({target:tw(l,i),destination:s,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,p){var u=Na(t,Lo(s,lp(l,i))),f=Na(t,Lo(s,lp(p,i)));return u<f?-1:f<u?1:l.descriptor.index-p.descriptor.index});return c[0]||null},Ra=Ze(function(t,n){var s=n[t.line];return{value:s,point:Nn(t.line,s)}}),aw=function(t,n,s){var o=t.axis;if(t.descriptor.mode==="virtual")return Nn(o.line,n[o.line]);var i=t.subject.page.contentBox[o.size],c=ta(t.descriptor.id,s),l=c.reduce(function(f,m){return f+m.client.marginBox[o.size]},0),p=l+n[o.line],u=p-i;return u<=0?null:Nn(o.line,u)},cp=function(t,n){return ue({},t,{scroll:ue({},t.scroll,{max:n})})},dp=function(t,n,s){var o=t.frame;na(n,t)&&Q(!1),t.subject.withPlaceholder&&Q(!1);var i=Ra(t.axis,n.displaceBy).point,c=aw(t,i,s),l={placeholderSize:i,increasedBy:c,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!o){var p=ea({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:t.frame});return ue({},t,{subject:p})}var u=c?nt(o.scroll.max,c):o.scroll.max,f=cp(o,u),m=ea({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:f});return ue({},t,{subject:m,frame:f})},sw=function(t){var n=t.subject.withPlaceholder;n||Q(!1);var s=t.frame;if(!s){var o=ea({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ue({},t,{subject:o})}var i=n.oldFrameMaxScroll;i||Q(!1);var c=cp(s,i),l=ea({page:t.subject.page,axis:t.axis,frame:c,withPlaceholder:null});return ue({},t,{subject:l,frame:c})},rw=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,s=e.insideDestination,o=e.draggable,i=e.draggables,c=e.destination,l=e.viewport,p=e.afterCritical;if(!n){if(s.length)return null;var u={displaced:Ma,displacedBy:Zd,at:{type:"REORDER",destination:{droppableId:c.descriptor.id,index:0}}},f=Hs({impact:u,draggable:o,droppable:c,draggables:i,afterCritical:p}),m=na(o,c)?c:dp(c,o,i),g=ip({draggable:o,destination:m,newPageBorderBoxCenter:f,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return g?u:null}var S=Boolean(t[c.axis.line]<=n.page.borderBox.center[c.axis.line]),w=function(){var C=n.descriptor.index;return n.descriptor.id===o.descriptor.id||S?C:C+1}(),x=Ra(c.axis,o.displaceBy);return $s({draggable:o,insideDestination:s,destination:c,viewport:l,displacedBy:x,last:Ma,index:w})},ow=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,s=e.draggable,o=e.isOver,i=e.draggables,c=e.droppables,l=e.viewport,p=e.afterCritical,u=ew({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:c,viewport:l});if(!u)return null;var f=ta(u.descriptor.id,i),m=nw({pageBorderBoxCenter:n,viewport:l,destination:u,insideDestination:f,afterCritical:p}),g=rw({previousPageBorderBoxCenter:n,destination:u,draggable:s,draggables:i,moveRelativeTo:m,insideDestination:f,viewport:l,afterCritical:p});if(!g)return null;var S=Hs({impact:g,draggable:s,droppable:u,draggables:i,afterCritical:p}),w=Oo({pageBorderBoxCenter:S,draggable:s,viewport:l});return{clientSelection:w,impact:g,scrollJumpRequest:null}},St=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},iw=function(t,n){var s=St(t);return s?n[s]:null},lw=function(e){var t=e.state,n=e.type,s=iw(t.impact,t.dimensions.droppables),o=Boolean(s),i=t.dimensions.droppables[t.critical.droppable.id],c=s||i,l=c.axis.direction,p=l==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||l==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(p&&!o)return null;var u=n==="MOVE_DOWN"||n==="MOVE_RIGHT",f=t.dimensions.draggables[t.critical.draggable.id],m=t.current.page.borderBoxCenter,g=t.dimensions,S=g.draggables,w=g.droppables;return p?QT({isMovingForward:u,previousPageBorderBoxCenter:m,draggable:f,destination:c,draggables:S,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):ow({isMovingForward:u,previousPageBorderBoxCenter:m,draggable:f,isOver:c,draggables:S,droppables:w,viewport:t.viewport,afterCritical:t.afterCritical})};function kn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function pp(e){var t=Ct(e.top,e.bottom),n=Ct(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function cw(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function dw(e){var t=e.pageBorderBox,n=e.draggable,s=e.candidates,o=n.page.borderBox.center,i=s.map(function(c){var l=c.axis,p=Nn(c.axis.line,t.center[l.line],c.page.borderBox.center[l.crossAxisLine]);return{id:c.descriptor.id,distance:Na(o,p)}}).sort(function(c,l){return l.distance-c.distance});return i[0]?i[0].id:null}function pw(e){var t=e.pageBorderBox,n=e.draggable,s=e.droppables,o=Fs(s).filter(function(i){if(!i.isEnabled)return!1;var c=i.subject.active;if(!c||!cw(t,c))return!1;if(pp(c)(t.center))return!0;var l=i.axis,p=c.center[l.crossAxisLine],u=t[l.crossAxisStart],f=t[l.crossAxisEnd],m=Ct(c[l.crossAxisStart],c[l.crossAxisEnd]),g=m(u),S=m(f);return!g&&!S?!0:g?u<p:f>p});return o.length?o.length===1?o[0].descriptor.id:dw({pageBorderBox:t,draggable:n,candidates:o}):null}var up=function(t,n){return _t(ka(t,n))},uw=function(e,t){var n=e.frame;return n?up(t,n.scroll.diff.value):t};function mp(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}function mw(e){var t=e.draggable,n=e.closest,s=e.inHomeList;return n?s&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var fw=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,s=e.destination,o=e.insideDestination,i=e.last,c=e.viewport,l=e.afterCritical,p=s.axis,u=Ra(s.axis,n.displaceBy),f=u.value,m=t[p.start],g=t[p.end],S=Vs(n,o),w=pn(S,function(C){var D=C.descriptor.id,I=C.page.borderBox.center[p.line],v=un(D,l),k=mp({displaced:i,id:D});return v?k?g<=I:m<I-f:k?g<=I+f:m<I}),x=mw({draggable:n,closest:w,inHomeList:na(n,s)});return $s({draggable:n,insideDestination:o,destination:s,viewport:c,last:i,displacedBy:u,index:x})},hw=4,gw=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,s=e.previousImpact,o=e.destination,i=e.insideDestination,c=e.afterCritical;if(!o.isCombineEnabled)return null;var l=o.axis,p=Ra(o.axis,t.displaceBy),u=p.value,f=n[l.start],m=n[l.end],g=Vs(t,i),S=pn(g,function(x){var C=x.descriptor.id,D=x.page.borderBox,I=D[l.size],v=I/hw,k=un(C,c),R=mp({displaced:s.displaced,id:C});return k?R?m>D[l.start]+v&&m<D[l.end]-v:f>D[l.start]-u+v&&f<D[l.end]-u-v:R?m>D[l.start]+u+v&&m<D[l.end]+u-v:f>D[l.start]+v&&f<D[l.end]-v});if(!S)return null;var w={displacedBy:p,displaced:s.displaced,at:{type:"COMBINE",combine:{draggableId:S.descriptor.id,droppableId:o.descriptor.id}}};return w},fp=function(e){var t=e.pageOffset,n=e.draggable,s=e.draggables,o=e.droppables,i=e.previousImpact,c=e.viewport,l=e.afterCritical,p=up(n.page.borderBox,t),u=pw({pageBorderBox:p,draggable:n,droppables:o});if(!u)return MT;var f=o[u],m=ta(f.descriptor.id,s),g=uw(f,p);return gw({pageBorderBoxWithDroppableScroll:g,draggable:n,previousImpact:i,destination:f,insideDestination:m,afterCritical:l})||fw({pageBorderBoxWithDroppableScroll:g,draggable:n,destination:f,insideDestination:m,last:i.displaced,viewport:c,afterCritical:l})},Bo=function(e,t){var n;return ue({},e,(n={},n[t.descriptor.id]=t,n))},Sw=function(t){var n=t.previousImpact,s=t.impact,o=t.droppables,i=St(n),c=St(s);if(!i||i===c)return o;var l=o[i];if(!l.subject.withPlaceholder)return o;var p=sw(l);return Bo(o,p)},bw=function(e){var t=e.draggable,n=e.draggables,s=e.droppables,o=e.previousImpact,i=e.impact,c=Sw({previousImpact:o,impact:i,droppables:s}),l=St(i);if(!l)return c;var p=s[l];if(na(t,p)||p.subject.withPlaceholder)return c;var u=dp(p,t,n);return Bo(c,u)},La=function(e){var t=e.state,n=e.clientSelection,s=e.dimensions,o=e.viewport,i=e.impact,c=e.scrollJumpRequest,l=o||t.viewport,p=s||t.dimensions,u=n||t.current.client.selection,f=gt(u,t.initial.client.selection),m={offset:f,selection:u,borderBoxCenter:nt(t.initial.client.borderBoxCenter,f)},g={selection:nt(m.selection,l.scroll.current),borderBoxCenter:nt(m.borderBoxCenter,l.scroll.current),offset:nt(m.offset,l.scroll.diff.value)},S={client:m,page:g};if(t.phase==="COLLECTING")return ue({phase:"COLLECTING"},t,{dimensions:p,viewport:l,current:S});var w=p.draggables[t.critical.draggable.id],x=i||fp({pageOffset:g.offset,draggable:w,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),C=bw({draggable:w,impact:x,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),D=ue({},t,{current:S,dimensions:{draggables:p.draggables,droppables:C},impact:x,viewport:l,scrollJumpRequest:c||null,forceShouldAnimate:c?!1:null});return D};function vw(e,t){return e.map(function(n){return t[n]})}var hp=function(e){var t=e.impact,n=e.viewport,s=e.draggables,o=e.destination,i=e.forceShouldAnimate,c=t.displaced,l=vw(c.all,s),p=_a({afterDragging:l,destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:i,last:c});return ue({},t,{displaced:p})},gp=function(e){var t=e.impact,n=e.draggable,s=e.droppable,o=e.draggables,i=e.viewport,c=e.afterCritical,l=Hs({impact:t,draggable:n,draggables:o,droppable:s,afterCritical:c});return Oo({pageBorderBoxCenter:l,draggable:n,viewport:i})},Sp=function(e){var t=e.state,n=e.dimensions,s=e.viewport;t.movementMode!=="SNAP"&&Q(!1);var o=t.impact,i=s||t.viewport,c=n||t.dimensions,l=c.draggables,p=c.droppables,u=l[t.critical.draggable.id],f=St(o);f||Q(!1);var m=p[f],g=hp({impact:o,viewport:i,destination:m,draggables:l}),S=gp({impact:g,draggable:u,droppable:m,draggables:l,viewport:i,afterCritical:t.afterCritical});return La({impact:g,clientSelection:S,state:t,dimensions:c,viewport:i})},yw=function(e){return{index:e.index,droppableId:e.droppableId}},bp=function(e){var t=e.draggable,n=e.home,s=e.draggables,o=e.viewport,i=Ra(n.axis,t.displaceBy),c=ta(n.descriptor.id,s),l=c.indexOf(t);l===-1&&Q(!1);var p=c.slice(l+1),u=p.reduce(function(S,w){return S[w.descriptor.id]=!0,S},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:i,effected:u},m=_a({afterDragging:p,destination:n,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),g={displaced:m,displacedBy:i,at:{type:"REORDER",destination:yw(t.descriptor)}};return{impact:g,afterCritical:f}},Tw=function(e,t){return{draggables:e.draggables,droppables:Bo(e.droppables,t)}},ww=function(e){var t=e.draggable,n=e.offset,s=e.initialWindowScroll,o=Rs(t.client,n),i=Ls(o,s),c=ue({},t,{placeholder:ue({},t.placeholder,{client:o}),client:o,page:i});return c},Ew=function(e){var t=e.frame;return t||Q(!1),t},Cw=function(e){var t=e.additions,n=e.updatedDroppables,s=e.viewport,o=s.scroll.diff.value;return t.map(function(i){var c=i.descriptor.droppableId,l=n[c],p=Ew(l),u=p.scroll.diff.value,f=nt(o,u),m=ww({draggable:i,offset:f,initialWindowScroll:s.scroll.initial});return m})},xw=function(e){var t=e.state,n=e.published,s=n.modified.map(function(v){var k=t.dimensions.droppables[v.droppableId],R=Io(k,v.scroll);return R}),o=ue({},t.dimensions.droppables,{},qd(s)),i=Jd(Cw({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),c=ue({},t.dimensions.draggables,{},i);n.removals.forEach(function(v){delete c[v]});var l={droppables:o,draggables:c},p=St(t.impact),u=p?l.droppables[p]:null,f=l.draggables[t.critical.draggable.id],m=l.droppables[t.critical.droppable.id],g=bp({draggable:f,home:m,draggables:c,viewport:t.viewport}),S=g.impact,w=g.afterCritical,x=u&&u.isCombineEnabled?t.impact:S,C=fp({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:x,viewport:t.viewport,afterCritical:w}),D=ue({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:C,onLiftImpact:S,dimensions:l,afterCritical:w,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return D;var I=ue({phase:"DROP_PENDING"},D,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return I},Ao=function(t){return t.movementMode==="SNAP"},Po=function(t,n,s){var o=Tw(t.dimensions,n);return!Ao(t)||s?La({state:t,dimensions:o}):Sp({state:t,dimensions:o})};function Fo(e){return e.isDragging&&e.movementMode==="SNAP"?ue({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var vp={phase:"IDLE",completed:null,shouldFlush:!1},Dw=function(e,t){if(e===void 0&&(e=vp),t.type==="FLUSH")return ue({},vp,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Q(!1);var n=t.payload,s=n.critical,o=n.clientSelection,i=n.viewport,c=n.dimensions,l=n.movementMode,p=c.draggables[s.draggable.id],u=c.droppables[s.droppable.id],f={selection:o,borderBoxCenter:p.client.borderBox.center,offset:Xe},m={client:f,page:{selection:nt(f.selection,i.scroll.initial),borderBoxCenter:nt(f.selection,i.scroll.initial),offset:nt(f.selection,i.scroll.diff.value)}},g=Fs(c.droppables).every(function($e){return!$e.isFixedOnPage}),S=bp({draggable:p,home:u,draggables:c.draggables,viewport:i}),w=S.impact,x=S.afterCritical,C={phase:"DRAGGING",isDragging:!0,critical:s,movementMode:l,dimensions:c,initial:m,current:m,isWindowScrollAllowed:g,impact:w,afterCritical:x,onLiftImpact:w,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null};return C}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Q(!1);var D=ue({phase:"COLLECTING"},e,{phase:"COLLECTING"});return D}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Q(!1),xw({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;kn(e)||Q(!1);var I=t.payload.client;return dn(I,e.current.client.selection)?e:La({state:e,clientSelection:I,impact:Ao(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Fo(e);kn(e)||Q(!1);var v=t.payload,k=v.id,R=v.newScroll,B=e.dimensions.droppables[k];if(!B)return e;var M=Io(B,R);return Po(e,M,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;kn(e)||Q(!1);var L=t.payload,F=L.id,A=L.isEnabled,$=e.dimensions.droppables[F];$||Q(!1),$.isEnabled===A&&Q(!1);var V=ue({},$,{isEnabled:A});return Po(e,V,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;kn(e)||Q(!1);var W=t.payload,pe=W.id,me=W.isCombineEnabled,re=e.dimensions.droppables[pe];re||Q(!1),re.isCombineEnabled===me&&Q(!1);var se=ue({},re,{isCombineEnabled:me});return Po(e,se,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;kn(e)||Q(!1),e.isWindowScrollAllowed||Q(!1);var j=t.payload.newScroll;if(dn(e.viewport.scroll.current,j))return Fo(e);var Z=rp(e.viewport,j);return Ao(e)?Sp({state:e,viewport:Z}):La({state:e,viewport:Z})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!kn(e))return e;var oe=t.payload.maxScroll;if(dn(oe,e.viewport.scroll.max))return e;var ee=ue({},e.viewport,{scroll:ue({},e.viewport.scroll,{max:oe})});return ue({phase:"DRAGGING"},e,{viewport:ee})}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"&&Q(!1);var te=lw({state:e,type:t.type});return te?La({state:e,impact:te.impact,clientSelection:te.clientSelection,scrollJumpRequest:te.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var X=t.payload.reason;e.phase!=="COLLECTING"&&Q(!1);var le=ue({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:X});return le}if(t.type==="DROP_ANIMATE"){var q=t.payload,ye=q.completed,Ie=q.dropDuration,Ce=q.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Q(!1);var we={phase:"DROP_ANIMATING",completed:ye,dropDuration:Ie,newHomeClientOffset:Ce,dimensions:e.dimensions};return we}if(t.type==="DROP_COMPLETE"){var Ke=t.payload.completed;return{phase:"IDLE",completed:Ke,shouldFlush:!1}}return e},Iw=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},Nw=function(t){return{type:"LIFT",payload:t}},kw=function(t){return{type:"INITIAL_PUBLISH",payload:t}},Mw=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},_w=function(){return{type:"COLLECTION_STARTING",payload:null}},Rw=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},Lw=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},Ow=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},yp=function(t){return{type:"MOVE",payload:t}},Bw=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},Aw=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},Pw=function(){return{type:"MOVE_UP",payload:null}},Fw=function(){return{type:"MOVE_DOWN",payload:null}},Kw=function(){return{type:"MOVE_RIGHT",payload:null}},Vw=function(){return{type:"MOVE_LEFT",payload:null}},Ko=function(){return{type:"FLUSH",payload:null}},$w=function(t){return{type:"DROP_ANIMATE",payload:t}},Vo=function(t){return{type:"DROP_COMPLETE",payload:t}},Tp=function(t){return{type:"DROP",payload:t}},Hw=function(t){return{type:"DROP_PENDING",payload:t}},wp=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},Ww=function(e){return function(t){var n=t.getState,s=t.dispatch;return function(o){return function(i){if(i.type!=="LIFT"){o(i);return}var c=i.payload,l=c.id,p=c.clientSelection,u=c.movementMode,f=n();f.phase==="DROP_ANIMATING"&&s(Vo({completed:f.completed})),n().phase!=="IDLE"&&Q(!1),s(Ko()),s(Iw({draggableId:l,movementMode:u}));var m={shouldPublishImmediately:u==="SNAP"},g={draggableId:l,scrollOptions:m},S=e.startPublishing(g),w=S.critical,x=S.dimensions,C=S.viewport;s(kw({critical:w,dimensions:x,clientSelection:p,movementMode:u,viewport:C}))}}}},Gw=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)}}}},$o={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Oa={opacity:{drop:0,combining:.7},scale:{drop:.75}},Ho={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Mn=Ho.outOfTheWay+"s "+$o.outOfTheWay,Ba={fluid:"opacity "+Mn,snap:"transform "+Mn+", opacity "+Mn,drop:function(t){var n=t+"s "+$o.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Mn,placeholder:"height "+Mn+", width "+Mn+", margin "+Mn},Ep=function(t){return dn(t,Xe)?null:"translate("+t.x+"px, "+t.y+"px)"},Wo={moveTo:Ep,drop:function(t,n){var s=Ep(t);return s?n?s+" scale("+Oa.scale.drop+")":s:null}},Go=Ho.minDropTime,Cp=Ho.maxDropTime,Uw=Cp-Go,xp=1500,Yw=.6,zw=function(e){var t=e.current,n=e.destination,s=e.reason,o=Na(t,n);if(o<=0)return Go;if(o>=xp)return Cp;var i=o/xp,c=Go+Uw*i,l=s==="CANCEL"?c*Yw:c;return Number(l.toFixed(2))},jw=function(e){var t=e.impact,n=e.draggable,s=e.dimensions,o=e.viewport,i=e.afterCritical,c=s.draggables,l=s.droppables,p=St(t),u=p?l[p]:null,f=l[n.descriptor.droppableId],m=gp({impact:t,draggable:n,draggables:c,afterCritical:i,droppable:u||f,viewport:o}),g=gt(m,n.client.borderBox.center);return g},qw=function(e){var t=e.draggables,n=e.reason,s=e.lastImpact,o=e.home,i=e.viewport,c=e.onLiftImpact;if(!s.at||n!=="DROP"){var l=hp({draggables:t,impact:c,destination:o,viewport:i,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(s.at.type==="REORDER")return{impact:s,didDropInsideDroppable:!0};var p=ue({},s,{displaced:Ma});return{impact:p,didDropInsideDroppable:!0}},Jw=function(e){var t=e.getState,n=e.dispatch;return function(s){return function(o){if(o.type!=="DROP"){s(o);return}var i=t(),c=o.payload.reason;if(i.phase==="COLLECTING"){n(Hw({reason:c}));return}if(i.phase!=="IDLE"){var l=i.phase==="DROP_PENDING"&&i.isWaiting;l&&Q(!1),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||Q(!1);var p=i.critical,u=i.dimensions,f=u.draggables[i.critical.draggable.id],m=qw({reason:c,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),g=m.impact,S=m.didDropInsideDroppable,w=S?ko(g):null,x=S?Ks(g):null,C={index:p.draggable.index,droppableId:p.droppable.id},D={draggableId:f.descriptor.id,type:f.descriptor.type,source:C,reason:c,mode:i.movementMode,destination:w,combine:x},I=jw({impact:g,draggable:f,dimensions:u,viewport:i.viewport,afterCritical:i.afterCritical}),v={critical:i.critical,afterCritical:i.afterCritical,result:D,impact:g},k=!dn(i.current.client.offset,I)||Boolean(D.combine);if(!k){n(Vo({completed:v}));return}var R=zw({current:i.current.client.offset,destination:I,reason:c}),B={newHomeClientOffset:I,dropDuration:R,completed:v};n($w(B))}}}},Dp=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Zw(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function Xw(e){var t=e.onWindowScroll;function n(){t(Dp())}var s=Ia(n),o=Zw(s),i=cn;function c(){return i!==cn}function l(){c()&&Q(!1),i=Et(window,[o])}function p(){c()||Q(!1),s.cancel(),i(),i=cn}return{start:l,stop:p,isActive:c}}var Qw=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},eE=function(e){var t=Xw({onWindowScroll:function(s){e.dispatch(Bw({newScroll:s}))}});return function(n){return function(s){!t.isActive()&&s.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Qw(s)&&t.stop(),n(s)}}},tE=function(e){var t=!1,n=!1,s=setTimeout(function(){n=!0}),o=function(c){t||n||(t=!0,e(c),clearTimeout(s))};return o.wasCalled=function(){return t},o},nE=function(){var e=[],t=function(i){var c=No(e,function(u){return u.timerId===i});c===-1&&Q(!1);var l=e.splice(c,1),p=l[0];p.callback()},n=function(i){var c=setTimeout(function(){return t(c)}),l={timerId:c,callback:i};e.push(l)},s=function(){if(!!e.length){var i=[].concat(e);e.length=0,i.forEach(function(c){clearTimeout(c.timerId),c.callback()})}};return{add:n,flush:s}},aE=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},sE=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},rE=function(t,n){if(t===n)return!0;var s=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,o=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return s&&o},Aa=function(t,n){n()},Ws=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},Uo=function(t,n,s,o){if(!t){s(o(n));return}var i=tE(s),c={announce:i};t(n,c),i.wasCalled()||s(o(n))},oE=function(e,t){var n=nE(),s=null,o=function(g,S){s&&Q(!1),Aa("onBeforeCapture",function(){var w=e().onBeforeCapture;if(w){var x={draggableId:g,mode:S};w(x)}})},i=function(g,S){s&&Q(!1),Aa("onBeforeDragStart",function(){var w=e().onBeforeDragStart;w&&w(Ws(g,S))})},c=function(g,S){s&&Q(!1);var w=Ws(g,S);s={mode:S,lastCritical:g,lastLocation:w.source,lastCombine:null},n.add(function(){Aa("onDragStart",function(){return Uo(e().onDragStart,w,t,As.onDragStart)})})},l=function(g,S){var w=ko(S),x=Ks(S);s||Q(!1);var C=!rE(g,s.lastCritical);C&&(s.lastCritical=g);var D=!aE(s.lastLocation,w);D&&(s.lastLocation=w);var I=!sE(s.lastCombine,x);if(I&&(s.lastCombine=x),!(!C&&!D&&!I)){var v=ue({},Ws(g,s.mode),{combine:x,destination:w});n.add(function(){Aa("onDragUpdate",function(){return Uo(e().onDragUpdate,v,t,As.onDragUpdate)})})}},p=function(){s||Q(!1),n.flush()},u=function(g){s||Q(!1),s=null,Aa("onDragEnd",function(){return Uo(e().onDragEnd,g,t,As.onDragEnd)})},f=function(){if(!!s){var g=ue({},Ws(s.lastCritical,s.mode),{combine:null,destination:null,reason:"CANCEL"});u(g)}};return{beforeCapture:o,beforeStart:i,start:c,update:l,flush:p,drop:u,abort:f}},iE=function(e,t){var n=oE(e,t);return function(s){return function(o){return function(i){if(i.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(i.type==="INITIAL_PUBLISH"){var c=i.payload.critical;n.beforeStart(c,i.payload.movementMode),o(i),n.start(c,i.payload.movementMode);return}if(i.type==="DROP_COMPLETE"){var l=i.payload.completed.result;n.flush(),o(i),n.drop(l);return}if(o(i),i.type==="FLUSH"){n.abort();return}var p=s.getState();p.phase==="DRAGGING"&&n.update(p.critical,p.impact)}}}},lE=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var s=e.getState();s.phase!=="DROP_ANIMATING"&&Q(!1),e.dispatch(Vo({completed:s.completed}))}}},cE=function(e){var t=null,n=null;function s(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(o){return function(i){if((i.type==="FLUSH"||i.type==="DROP_COMPLETE"||i.type==="DROP_ANIMATION_FINISHED")&&s(),o(i),i.type==="DROP_ANIMATE"){var c={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var p=e.getState();p.phase==="DROP_ANIMATING"&&e.dispatch(wp())}};n=requestAnimationFrame(function(){n=null,t=Et(window,[c])})}}}},dE=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)}}}},pE=function(e){var t=!1;return function(){return function(n){return function(s){if(s.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(s.payload.critical.draggable.id),n(s),e.tryRestoreFocusRecorded();return}if(n(s),!!t){if(s.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(s.type==="DROP_COMPLETE"){t=!1;var o=s.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},uE=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},mE=function(e){return function(t){return function(n){return function(s){if(uE(s)){e.stop(),n(s);return}if(s.type==="INITIAL_PUBLISH"){n(s);var o=t.getState();o.phase!=="DRAGGING"&&Q(!1),e.start(o);return}n(s),e.scroll(t.getState())}}}},fE=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var s=e.getState();s.phase==="DROP_PENDING"&&(s.isWaiting||e.dispatch(Tp({reason:s.reason})))}}}},hE=Sd,gE=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,s=e.styleMarshal,o=e.getResponders,i=e.announce,c=e.autoScroller;return fd(Dw,hE(fy(Gw(s),dE(t),Ww(t),Jw,lE,cE,fE,mE(c),eE,pE(n),iE(o,i))))},Yo=function(){return{additions:{},removals:{},modified:{}}};function SE(e){var t=e.registry,n=e.callbacks,s=Yo(),o=null,i=function(){o||(n.collectionStarting(),o=requestAnimationFrame(function(){o=null;var f=s,m=f.additions,g=f.removals,S=f.modified,w=Object.keys(m).map(function(D){return t.draggable.getById(D).getDimension(Xe)}).sort(function(D,I){return D.descriptor.index-I.descriptor.index}),x=Object.keys(S).map(function(D){var I=t.droppable.getById(D),v=I.callbacks.getScrollWhileDragging();return{droppableId:D,scroll:v}}),C={additions:w,removals:Object.keys(g),modified:x};s=Yo(),n.publish(C)}))},c=function(f){var m=f.descriptor.id;s.additions[m]=f,s.modified[f.descriptor.droppableId]=!0,s.removals[m]&&delete s.removals[m],i()},l=function(f){var m=f.descriptor;s.removals[m.id]=!0,s.modified[m.droppableId]=!0,s.additions[m.id]&&delete s.additions[m.id],i()},p=function(){!o||(cancelAnimationFrame(o),o=null,s=Yo())};return{add:c,remove:l,stop:p}}var Ip=function(e){var t=e.scrollHeight,n=e.scrollWidth,s=e.height,o=e.width,i=gt({x:n,y:t},{x:o,y:s}),c={x:Math.max(0,i.x),y:Math.max(0,i.y)};return c},Np=function(){var e=document.documentElement;return e||Q(!1),e},kp=function(){var e=Np(),t=Ip({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},bE=function(){var e=Dp(),t=kp(),n=e.y,s=e.x,o=Np(),i=o.clientWidth,c=o.clientHeight,l=s+i,p=n+c,u=_t({top:n,left:s,right:l,bottom:p}),f={frame:u,scroll:{initial:e,current:e,max:t,diff:{value:Xe,displacement:Xe}}};return f},vE=function(e){var t=e.critical,n=e.scrollOptions,s=e.registry,o=bE(),i=o.scroll.current,c=t.droppable,l=s.droppable.getAllByType(c.type).map(function(m){return m.callbacks.getDimensionAndWatchScroll(i,n)}),p=s.draggable.getAllByType(t.draggable.type).map(function(m){return m.getDimension(i)}),u={draggables:Jd(p),droppables:qd(l)},f={dimensions:u,critical:t,viewport:o};return f};function Mp(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var s=e.droppable.getById(n.descriptor.droppableId);return s.descriptor.mode==="virtual"}var yE=function(e,t){var n=null,s=SE({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(S,w){e.droppable.exists(S)||Q(!1),!!n&&t.updateDroppableIsEnabled({id:S,isEnabled:w})},i=function(S,w){!n||(e.droppable.exists(S)||Q(!1),t.updateDroppableIsCombineEnabled({id:S,isCombineEnabled:w}))},c=function(S,w){!n||(e.droppable.exists(S)||Q(!1),t.updateDroppableScroll({id:S,newScroll:w}))},l=function(S,w){!n||e.droppable.getById(S).callbacks.scroll(w)},p=function(){if(!!n){s.stop();var S=n.critical.droppable;e.droppable.getAllByType(S.type).forEach(function(w){return w.callbacks.dragStopped()}),n.unsubscribe(),n=null}},u=function(S){n||Q(!1);var w=n.critical.draggable;S.type==="ADDITION"&&Mp(e,w,S.value)&&s.add(S.value),S.type==="REMOVAL"&&Mp(e,w,S.value)&&s.remove(S.value)},f=function(S){n&&Q(!1);var w=e.draggable.getById(S.draggableId),x=e.droppable.getById(w.descriptor.droppableId),C={draggable:w.descriptor,droppable:x.descriptor},D=e.subscribe(u);return n={critical:C,unsubscribe:D},vE({critical:C,registry:e,scrollOptions:S.scrollOptions})},m={updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:l,updateDroppableScroll:c,startPublishing:f,stopPublishing:p};return m},_p=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},TE=function(e){window.scrollBy(e.x,e.y)},wE=Ze(function(e){return Fs(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),EE=function(t,n){var s=pn(wE(n),function(o){return o.frame||Q(!1),pp(o.frame.pageMarginBox)(t)});return s},CE=function(e){var t=e.center,n=e.destination,s=e.droppables;if(n){var o=s[n];return o.frame?o:null}var i=EE(t,s);return i},mn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},xE=function(e,t){var n=e[t.size]*mn.startFromPercentage,s=e[t.size]*mn.maxScrollAtPercentage,o={startScrollingFrom:n,maxScrollValueAt:s};return o},Rp=function(e){var t=e.startOfRange,n=e.endOfRange,s=e.current,o=n-t;if(o===0)return 0;var i=s-t,c=i/o;return c},zo=1,DE=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return mn.maxPixelScroll;if(e===t.startScrollingFrom)return zo;var n=Rp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),s=1-n,o=mn.maxPixelScroll*mn.ease(s);return Math.ceil(o)},Lp=mn.durationDampening.accelerateAt,Op=mn.durationDampening.stopDampeningAt,IE=function(e,t){var n=t,s=Op,o=Date.now(),i=o-n;if(i>=Op)return e;if(i<Lp)return zo;var c=Rp({startOfRange:Lp,endOfRange:s,current:i}),l=e*mn.ease(c);return Math.ceil(l)},Bp=function(e){var t=e.distanceToEdge,n=e.thresholds,s=e.dragStartTime,o=e.shouldUseTimeDampening,i=DE(t,n);return i===0?0:o?Math.max(IE(i,s),zo):i},Ap=function(e){var t=e.container,n=e.distanceToEdges,s=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,c=xE(t,o),l=n[o.end]<n[o.start];return l?Bp({distanceToEdge:n[o.end],thresholds:c,dragStartTime:s,shouldUseTimeDampening:i}):-1*Bp({distanceToEdge:n[o.start],thresholds:c,dragStartTime:s,shouldUseTimeDampening:i})},NE=function(e){var t=e.container,n=e.subject,s=e.proposedScroll,o=n.height>t.height,i=n.width>t.width;return!i&&!o?s:i&&o?null:{x:i?0:s.x,y:o?0:s.y}},kE=Yd(function(e){return e===0?0:e}),Pp=function(e){var t=e.dragStartTime,n=e.container,s=e.subject,o=e.center,i=e.shouldUseTimeDampening,c={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},l=Ap({container:n,distanceToEdges:c,dragStartTime:t,axis:Mo,shouldUseTimeDampening:i}),p=Ap({container:n,distanceToEdges:c,dragStartTime:t,axis:Qd,shouldUseTimeDampening:i}),u=kE({x:p,y:l});if(dn(u,Xe))return null;var f=NE({container:n,subject:s,proposedScroll:u});return f?dn(f,Xe)?null:f:null},ME=Yd(function(e){return e===0?0:e>0?1:-1}),jo=function(){var e=function(n,s){return n<0?n:n>s?n-s:0};return function(t){var n=t.current,s=t.max,o=t.change,i=nt(n,o),c={x:e(i.x,s.x),y:e(i.y,s.y)};return dn(c,Xe)?null:c}}(),Fp=function(t){var n=t.max,s=t.current,o=t.change,i={x:Math.max(s.x,n.x),y:Math.max(s.y,n.y)},c=ME(o),l=jo({max:i,current:s,change:c});return!l||c.x!==0&&l.x===0||c.y!==0&&l.y===0},qo=function(t,n){return Fp({current:t.scroll.current,max:t.scroll.max,change:n})},_E=function(t,n){if(!qo(t,n))return null;var s=t.scroll.max,o=t.scroll.current;return jo({current:o,max:s,change:n})},Jo=function(t,n){var s=t.frame;return s?Fp({current:s.scroll.current,max:s.scroll.max,change:n}):!1},RE=function(t,n){var s=t.frame;return!s||!Jo(t,n)?null:jo({current:s.scroll.current,max:s.scroll.max,change:n})},LE=function(e){var t=e.viewport,n=e.subject,s=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,c=Pp({dragStartTime:o,container:t.frame,subject:n,center:s,shouldUseTimeDampening:i});return c&&qo(t,c)?c:null},OE=function(e){var t=e.droppable,n=e.subject,s=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,c=t.frame;if(!c)return null;var l=Pp({dragStartTime:o,container:c.pageMarginBox,subject:n,center:s,shouldUseTimeDampening:i});return l&&Jo(t,l)?l:null},Kp=function(e){var t=e.state,n=e.dragStartTime,s=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,c=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],p=l.page.marginBox;if(t.isWindowScrollAllowed){var u=t.viewport,f=LE({dragStartTime:n,viewport:u,subject:p,center:c,shouldUseTimeDampening:s});if(f){o(f);return}}var m=CE({center:c,destination:St(t.impact),droppables:t.dimensions.droppables});if(!!m){var g=OE({dragStartTime:n,droppable:m,subject:p,center:c,shouldUseTimeDampening:s});g&&i(m.descriptor.id,g)}},BE=function(e){var t=e.scrollWindow,n=e.scrollDroppable,s=Ia(t),o=Ia(n),i=null,c=function(f){i||Q(!1);var m=i,g=m.shouldUseTimeDampening,S=m.dragStartTime;Kp({state:f,scrollWindow:s,scrollDroppable:o,dragStartTime:S,shouldUseTimeDampening:g})},l=function(f){i&&Q(!1);var m=Date.now(),g=!1,S=function(){g=!0};Kp({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:S,scrollDroppable:S}),i={dragStartTime:m,shouldUseTimeDampening:g},g&&c(f)},p=function(){!i||(s.cancel(),o.cancel(),i=null)};return{start:l,stop:p,scroll:c}},AE=function(e){var t=e.move,n=e.scrollDroppable,s=e.scrollWindow,o=function(u,f){var m=nt(u.current.client.selection,f);t({client:m})},i=function(u,f){if(!Jo(u,f))return f;var m=RE(u,f);if(!m)return n(u.descriptor.id,f),null;var g=gt(f,m);n(u.descriptor.id,g);var S=gt(f,g);return S},c=function(u,f,m){if(!u||!qo(f,m))return m;var g=_E(f,m);if(!g)return s(m),null;var S=gt(m,g);s(S);var w=gt(m,S);return w},l=function(u){var f=u.scrollJumpRequest;if(!!f){var m=St(u.impact);m||Q(!1);var g=i(u.dimensions.droppables[m],f);if(!!g){var S=u.viewport,w=c(u.isWindowScrollAllowed,S,g);!w||o(u,w)}}};return l},PE=function(e){var t=e.scrollDroppable,n=e.scrollWindow,s=e.move,o=BE({scrollWindow:n,scrollDroppable:t}),i=AE({move:s,scrollWindow:n,scrollDroppable:t}),c=function(u){if(u.phase==="DRAGGING"){if(u.movementMode==="FLUID"){o.scroll(u);return}!u.scrollJumpRequest||i(u)}},l={scroll:c,start:o.start,stop:o.stop};return l},aa="data-rbd",sa=function(){var e=aa+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Zo=function(){var e=aa+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),FE=function(){var e=aa+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Vp={contextId:aa+"-scroll-container-context-id"},KE=function(t){return function(n){return"["+n+'="'+t+'"]'}},Pa=function(t,n){return t.map(function(s){var o=s.styles[n];return o?s.selector+" { "+o+" }":""}).join(" ")},VE="pointer-events: none;",$E=function(e){var t=KE(e),n=function(){var l=`
|
|
1077
1077
|
cursor: -webkit-grab;
|
|
1078
1078
|
cursor: grab;
|
|
1079
1079
|
`;return{selector:t(sa.contextId),styles:{always:`
|
|
@@ -1090,7 +1090,7 @@
|
|
|
1090
1090
|
-moz-user-select: none;
|
|
1091
1091
|
-ms-user-select: none;
|
|
1092
1092
|
overflow-anchor: none;
|
|
1093
|
-
`}},c=[s,n,o,i];return{always:Pa(c,"always"),resting:Pa(c,"resting"),dragging:Pa(c,"dragging"),dropAnimating:Pa(c,"dropAnimating"),userCancel:Pa(c,"userCancel")}},bt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?$.useLayoutEffect:$.useEffect,Xo=function(){var t=document.querySelector("head");return t||Q(!1),t},$p=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function HE(e,t){var n=Ne(function(){return $E(e)},[e]),s=$.useRef(null),o=$.useRef(null),i=fe(Ze(function(m){var g=o.current;g||Q(!1),g.textContent=m}),[]),c=fe(function(m){var g=s.current;g||Q(!1),g.textContent=m},[]);bt(function(){!s.current&&!o.current||Q(!1);var m=$p(t),g=$p(t);return s.current=m,o.current=g,m.setAttribute(aa+"-always",e),g.setAttribute(aa+"-dynamic",e),Xo().appendChild(m),Xo().appendChild(g),c(n.always),i(n.resting),function(){var S=function(x){var E=x.current;E||Q(!1),Xo().removeChild(E),x.current=null};S(s),S(o)}},[t,c,i,n.always,n.resting,e]);var l=fe(function(){return i(n.dragging)},[i,n.dragging]),p=fe(function(m){if(m==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),u=fe(function(){!o.current||i(n.resting)},[i,n.resting]),f=Ne(function(){return{dragging:l,dropping:p,resting:u}},[l,p,u]);return f}var Hp=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Gs(e){return e instanceof Hp(e).HTMLElement}function WE(e,t){var n="["+sa.contextId+'="'+e+'"]',s=jd(document.querySelectorAll(n));if(!s.length)return null;var o=pn(s,function(i){return i.getAttribute(sa.draggableId)===t});return!o||!Gs(o)?null:o}function GE(e){var t=$.useRef({}),n=$.useRef(null),s=$.useRef(null),o=$.useRef(!1),i=fe(function(g,S){var w={id:g,focus:S};return t.current[g]=w,function(){var E=t.current,D=E[g];D!==w&&delete E[g]}},[]),c=fe(function(g){var S=WE(e,g);S&&S!==document.activeElement&&S.focus()},[e]),l=fe(function(g,S){n.current===g&&(n.current=S)},[]),p=fe(function(){s.current||!o.current||(s.current=requestAnimationFrame(function(){s.current=null;var g=n.current;g&&c(g)}))},[c]),u=fe(function(g){n.current=null;var S=document.activeElement;!S||S.getAttribute(sa.draggableId)===g&&(n.current=g)},[]);bt(function(){return o.current=!0,function(){o.current=!1;var g=s.current;g&&cancelAnimationFrame(g)}},[]);var f=Ne(function(){return{register:i,tryRecordFocus:u,tryRestoreFocusRecorded:p,tryShiftRecord:l}},[i,u,p,l]);return f}function UE(){var e={draggables:{},droppables:{}},t=[];function n(m){return t.push(m),function(){var S=t.indexOf(m);S!==-1&&t.splice(S,1)}}function s(m){t.length&&t.forEach(function(g){return g(m)})}function o(m){return e.draggables[m]||null}function i(m){var g=o(m);return g||Q(!1),g}var c={register:function(g){e.draggables[g.descriptor.id]=g,s({type:"ADDITION",value:g})},update:function(g,S){var w=e.draggables[S.descriptor.id];!w||w.uniqueId===g.uniqueId&&(delete e.draggables[S.descriptor.id],e.draggables[g.descriptor.id]=g)},unregister:function(g){var S=g.descriptor.id,w=o(S);!w||g.uniqueId===w.uniqueId&&(delete e.draggables[S],s({type:"REMOVAL",value:g}))},getById:i,findById:o,exists:function(g){return Boolean(o(g))},getAllByType:function(g){return Ps(e.draggables).filter(function(S){return S.descriptor.type===g})}};function l(m){return e.droppables[m]||null}function p(m){var g=l(m);return g||Q(!1),g}var u={register:function(g){e.droppables[g.descriptor.id]=g},unregister:function(g){var S=l(g.descriptor.id);!S||g.uniqueId===S.uniqueId&&delete e.droppables[g.descriptor.id]},getById:p,findById:l,exists:function(g){return Boolean(l(g))},getAllByType:function(g){return Ps(e.droppables).filter(function(S){return S.descriptor.type===g})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:c,droppable:u,subscribe:n,clean:f}}function YE(){var e=Ne(UE,[]);return $.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Qo=A.default.createContext(null),Us=function(){var e=document.body;return e||Q(!1),e},zE={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},jE=function(t){return"rbd-announcement-"+t};function qE(e){var t=Ne(function(){return jE(e)},[e]),n=$.useRef(null);$.useEffect(function(){var i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),ue(i.style,zE),Us().appendChild(i),function(){setTimeout(function(){var p=Us();p.contains(i)&&p.removeChild(i),i===n.current&&(n.current=null)})}},[t]);var s=fe(function(o){var i=n.current;if(i){i.textContent=o;return}},[]);return s}var Wp=0,JE={separator:"::"};function ZE(){Wp=0}function ei(e,t){return t===void 0&&(t=JE),Ne(function(){return""+e+t.separator+Wp++},[t.separator,e])}function XE(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function QE(e){var t=e.contextId,n=e.text,s=ei("hidden-text",{separator:"-"}),o=Ne(function(){return XE({contextId:t,uniqueId:s})},[s,t]);return $.useEffect(function(){var c=document.createElement("div");return c.id=o,c.textContent=n,c.style.display="none",Us().appendChild(c),function(){var p=Us();p.contains(c)&&p.removeChild(c)}},[o,n]),o}var Ys=A.default.createContext(null);function Gp(e){var t=$.useRef(e);return $.useEffect(function(){t.current=e}),t}function eC(){var e=null;function t(){return Boolean(e)}function n(c){return c===e}function s(c){e&&Q(!1);var l={abandon:c};return e=l,l}function o(){e||Q(!1),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:s,release:o,tryAbandon:i}}var tC=9,nC=13,ti=27,Up=32,aC=33,sC=34,rC=35,oC=36,iC=37,lC=38,cC=39,dC=40,zs,pC=(zs={},zs[nC]=!0,zs[tC]=!0,zs),Yp=function(e){pC[e.keyCode]&&e.preventDefault()},js=function(){var e="visibilitychange";if(typeof document=="undefined")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=pn(t,function(s){return"on"+s in document});return n||e}(),zp=0,jp=5;function uC(e,t){return Math.abs(t.x-e.x)>=jp||Math.abs(t.y-e.y)>=jp}var qp={type:"IDLE"};function mC(e){var t=e.cancel,n=e.completed,s=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(c){var l=c.button,p=c.clientX,u=c.clientY;if(l===zp){var f={x:p,y:u},m=s();if(m.type==="DRAGGING"){c.preventDefault(),m.actions.move(f);return}m.type!=="PENDING"&&Q(!1);var g=m.point;if(!!uC(g,f)){c.preventDefault();var S=m.actions.fluidLift(f);o({type:"DRAGGING",actions:S})}}}},{eventName:"mouseup",fn:function(c){var l=s();if(l.type!=="DRAGGING"){t();return}c.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(c){s().type==="DRAGGING"&&c.preventDefault(),t()}},{eventName:"keydown",fn:function(c){var l=s();if(l.type==="PENDING"){t();return}if(c.keyCode===ti){c.preventDefault(),t();return}Yp(c)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){s().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(c){var l=s();if(l.type==="IDLE"&&Q(!1),l.actions.shouldRespectForcePress()){t();return}c.preventDefault()}},{eventName:js,fn:t}]}function Jp(e){var t=$.useRef(qp),n=$.useRef(cn),s=Ne(function(){return{eventName:"mousedown",fn:function(m){if(!m.defaultPrevented&&m.button===zp&&!(m.ctrlKey||m.metaKey||m.shiftKey||m.altKey)){var g=e.findClosestDraggableId(m);if(!!g){var S=e.tryGetLock(g,c,{sourceEvent:m});if(!!S){m.preventDefault();var w={x:m.clientX,y:m.clientY};n.current(),u(S,w)}}}}}},[e]),o=Ne(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(m){if(!m.defaultPrevented){var g=e.findClosestDraggableId(m);if(!!g){var S=e.findOptionsForDraggable(g);!S||S.shouldRespectForcePress||!e.canGetLock(g)||m.preventDefault()}}}}},[e]),i=fe(function(){var m={passive:!1,capture:!0};n.current=Et(window,[o,s],m)},[o,s]),c=fe(function(){var f=t.current;f.type!=="IDLE"&&(t.current=qp,n.current(),i())},[i]),l=fe(function(){var f=t.current;c(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[c]),p=fe(function(){var m={capture:!0,passive:!1},g=mC({cancel:l,completed:c,getPhase:function(){return t.current},setPhase:function(w){t.current=w}});n.current=Et(window,g,m)},[l,c]),u=fe(function(m,g){t.current.type!=="IDLE"&&Q(!1),t.current={type:"PENDING",point:g,actions:m},p()},[p]);bt(function(){return i(),function(){n.current()}},[i])}var ra;function fC(){}var hC=(ra={},ra[sC]=!0,ra[aC]=!0,ra[oC]=!0,ra[rC]=!0,ra);function gC(e,t){function n(){t(),e.cancel()}function s(){t(),e.drop()}return[{eventName:"keydown",fn:function(i){if(i.keyCode===ti){i.preventDefault(),n();return}if(i.keyCode===Up){i.preventDefault(),s();return}if(i.keyCode===dC){i.preventDefault(),e.moveDown();return}if(i.keyCode===lC){i.preventDefault(),e.moveUp();return}if(i.keyCode===cC){i.preventDefault(),e.moveRight();return}if(i.keyCode===iC){i.preventDefault(),e.moveLeft();return}if(hC[i.keyCode]){i.preventDefault();return}Yp(i)}},{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:js,fn:n}]}function Zp(e){var t=$.useRef(fC),n=Ne(function(){return{eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Up)return;var c=e.findClosestDraggableId(i);if(!c)return;var l=e.tryGetLock(c,f,{sourceEvent:i});if(!l)return;i.preventDefault();var p=!0,u=l.snapLift();t.current();function f(){p||Q(!1),p=!1,t.current(),s()}t.current=Et(window,gC(u,f),{capture:!0,passive:!1})}}},[e]),s=fe(function(){var i={passive:!1,capture:!0};t.current=Et(window,[n],i)},[n]);bt(function(){return s(),function(){t.current()}},[s])}var ni={type:"IDLE"},SC=120,bC=.15;function vC(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(n().type!=="DRAGGING"){t();return}o.keyCode===ti&&o.preventDefault(),t()}},{eventName:js,fn:t}]}function yC(e){var t=e.cancel,n=e.completed,s=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(i){var c=s();if(c.type!=="DRAGGING"){t();return}c.hasMoved=!0;var l=i.touches[0],p=l.clientX,u=l.clientY,f={x:p,y:u};i.preventDefault(),c.actions.move(f)}},{eventName:"touchend",fn:function(i){var c=s();if(c.type!=="DRAGGING"){t();return}i.preventDefault(),c.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(i){if(s().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(i){var c=s();c.type==="IDLE"&&Q(!1);var l=i.touches[0];if(!!l){var p=l.force>=bC;if(!!p){var u=c.actions.shouldRespectForcePress();if(c.type==="PENDING"){u&&t();return}if(u){if(c.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}}}},{eventName:js,fn:t}]}function Xp(e){var t=$.useRef(ni),n=$.useRef(cn),s=fe(function(){return t.current},[]),o=fe(function(S){t.current=S},[]),i=Ne(function(){return{eventName:"touchstart",fn:function(S){if(!S.defaultPrevented){var w=e.findClosestDraggableId(S);if(!!w){var x=e.tryGetLock(w,l,{sourceEvent:S});if(!!x){var E=S.touches[0],D=E.clientX,I=E.clientY,v={x:D,y:I};n.current(),m(x,v)}}}}}},[e]),c=fe(function(){var S={capture:!0,passive:!1};n.current=Et(window,[i],S)},[i]),l=fe(function(){var g=t.current;g.type!=="IDLE"&&(g.type==="PENDING"&&clearTimeout(g.longPressTimerId),o(ni),n.current(),c())},[c,o]),p=fe(function(){var g=t.current;l(),g.type==="DRAGGING"&&g.actions.cancel({shouldBlockNextClick:!0}),g.type==="PENDING"&&g.actions.abort()},[l]),u=fe(function(){var S={capture:!0,passive:!1},w={cancel:p,completed:l,getPhase:s},x=Et(window,yC(w),S),E=Et(window,vC(w),S);n.current=function(){x(),E()}},[p,s,l]),f=fe(function(){var S=s();S.type!=="PENDING"&&Q(!1);var w=S.actions.fluidLift(S.point);o({type:"DRAGGING",actions:w,hasMoved:!1})},[s,o]),m=fe(function(S,w){s().type!=="IDLE"&&Q(!1);var x=setTimeout(f,SC);o({type:"PENDING",point:w,actions:S,longPressTimerId:x}),u()},[u,s,o,f]);bt(function(){return c(),function(){n.current();var w=s();w.type==="PENDING"&&(clearTimeout(w.longPressTimerId),o(ni))}},[s,c,o]),bt(function(){var S=Et(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return S},[])}var TC={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Qp(e,t){if(t==null)return!1;var n=Boolean(TC[t.tagName.toLowerCase()]);if(n)return!0;var s=t.getAttribute("contenteditable");return s==="true"||s===""?!0:t===e?!1:Qp(e,t.parentElement)}function wC(e,t){var n=t.target;return Gs(n)?Qp(e,n):!1}var EC=function(e){return _t(e.getBoundingClientRect()).center};function CC(e){return e instanceof Hp(e).Element}var xC=function(){var e="matches";if(typeof document=="undefined")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=pn(t,function(s){return s in Element.prototype});return n||e}();function eu(e,t){return e==null?null:e[xC](t)?e:eu(e.parentElement,t)}function DC(e,t){return e.closest?e.closest(t):eu(e,t)}function IC(e){return"["+sa.contextId+'="'+e+'"]'}function NC(e,t){var n=t.target;if(!CC(n))return null;var s=IC(e),o=DC(n,s);return!o||!Gs(o)?null:o}function kC(e,t){var n=NC(e,t);return n?n.getAttribute(sa.draggableId):null}function MC(e,t){var n="["+Zo.contextId+'="'+e+'"]',s=jd(document.querySelectorAll(n)),o=pn(s,function(i){return i.getAttribute(Zo.id)===t});return!o||!Gs(o)?null:o}function _C(e){e.preventDefault()}function qs(e){var t=e.expected,n=e.phase,s=e.isLockActive;return e.shouldWarn,!(!s()||t!==n)}function tu(e){var t=e.lockAPI,n=e.store,s=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=s.draggable.findById(o);return!(!i||!i.options.isEnabled||!_p(n.getState(),o))}function RC(e){var t=e.lockAPI,n=e.contextId,s=e.store,o=e.registry,i=e.draggableId,c=e.forceSensorStop,l=e.sourceEvent,p=tu({lockAPI:t,store:s,registry:o,draggableId:i});if(!p)return null;var u=o.draggable.getById(i),f=MC(n,u.descriptor.id);if(!f||l&&!u.options.canDragInteractiveElements&&wC(f,l))return null;var m=t.claim(c||cn),g="PRE_DRAG";function S(){return u.options.shouldRespectForcePress}function w(){return t.isActive(m)}function x(O,R){qs({expected:O,phase:g,isLockActive:w,shouldWarn:!0})&&s.dispatch(R())}var E=x.bind(null,"DRAGGING");function D(O){function R(){t.release(),g="COMPLETED"}g!=="PRE_DRAG"&&(R(),g!=="PRE_DRAG"&&Q(!1)),s.dispatch(Nw(O.liftActionArgs)),g="DRAGGING";function B(F,P){if(P===void 0&&(P={shouldBlockNextClick:!1}),O.cleanup(),P.shouldBlockNextClick){var U=Et(window,[{eventName:"click",fn:_C,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(U)}R(),s.dispatch(Tp({reason:F}))}return ue({isActive:function(){return qs({expected:"DRAGGING",phase:g,isLockActive:w,shouldWarn:!1})},shouldRespectForcePress:S,drop:function(P){return B("DROP",P)},cancel:function(P){return B("CANCEL",P)}},O.actions)}function I(O){var R=Ia(function(F){E(function(){return yp({client:F})})}),B=D({liftActionArgs:{id:i,clientSelection:O,movementMode:"FLUID"},cleanup:function(){return R.cancel()},actions:{move:R}});return ue({},B,{move:R})}function v(){var O={moveUp:function(){return E(Pw)},moveRight:function(){return E(Kw)},moveDown:function(){return E(Fw)},moveLeft:function(){return E(Vw)}};return D({liftActionArgs:{id:i,clientSelection:EC(f),movementMode:"SNAP"},cleanup:cn,actions:O})}function N(){var O=qs({expected:"PRE_DRAG",phase:g,isLockActive:w,shouldWarn:!0});O&&t.release()}var _={isActive:function(){return qs({expected:"PRE_DRAG",phase:g,isLockActive:w,shouldWarn:!1})},shouldRespectForcePress:S,fluidLift:I,snapLift:v,abort:N};return _}var LC=[Jp,Zp,Xp];function OC(e){var t=e.contextId,n=e.store,s=e.registry,o=e.customSensors,i=e.enableDefaultSensors,c=[].concat(i?LC:[],o||[]),l=$.useState(function(){return eC()})[0],p=fe(function(I,v){I.isDragging&&!v.isDragging&&l.tryAbandon()},[l]);bt(function(){var I=n.getState(),v=n.subscribe(function(){var N=n.getState();p(I,N),I=N});return v},[l,n,p]),bt(function(){return l.tryAbandon},[l.tryAbandon]);for(var u=fe(function(D){return tu({lockAPI:l,registry:s,store:n,draggableId:D})},[l,s,n]),f=fe(function(D,I,v){return RC({lockAPI:l,registry:s,contextId:t,store:n,draggableId:D,forceSensorStop:I,sourceEvent:v&&v.sourceEvent?v.sourceEvent:null})},[t,l,s,n]),m=fe(function(D){return kC(t,D)},[t]),g=fe(function(D){var I=s.draggable.findById(D);return I?I.options:null},[s.draggable]),S=fe(function(){!l.isClaimed()||(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Ko()))},[l,n]),w=fe(l.isClaimed,[l]),x=Ne(function(){return{canGetLock:u,tryGetLock:f,findClosestDraggableId:m,findOptionsForDraggable:g,tryReleaseLock:S,isLockClaimed:w}},[u,f,m,g,S,w]),E=0;E<c.length;E++)c[E](x)}var BC=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function Fa(e){return e.current||Q(!1),e.current}function AC(e){var t=e.contextId,n=e.setCallbacks,s=e.sensors,o=e.nonce,i=e.dragHandleUsageInstructions,c=$.useRef(null),l=Gp(e),p=fe(function(){return BC(l.current)},[l]),u=qE(t),f=QE({contextId:t,text:i}),m=HE(t,o),g=fe(function(F){Fa(c).dispatch(F)},[]),S=Ne(function(){return gd({publishWhileDragging:Mw,updateDroppableScroll:Rw,updateDroppableIsEnabled:Lw,updateDroppableIsCombineEnabled:Ow,collectionStarting:_w},g)},[g]),w=YE(),x=Ne(function(){return yE(w,S)},[w,S]),E=Ne(function(){return PE(ue({scrollWindow:TE,scrollDroppable:x.scrollDroppable},gd({move:yp},g)))},[x.scrollDroppable,g]),D=GE(t),I=Ne(function(){return gE({announce:u,autoScroller:E,dimensionMarshal:x,focusMarshal:D,getResponders:p,styleMarshal:m})},[u,E,x,D,p,m]);c.current=I;var v=fe(function(){var F=Fa(c),P=F.getState();P.phase!=="IDLE"&&F.dispatch(Ko())},[]),N=fe(function(){var F=Fa(c).getState();return F.isDragging||F.phase==="DROP_ANIMATING"},[]),_=Ne(function(){return{isDragging:N,tryAbort:v}},[N,v]);n(_);var O=fe(function(F){return _p(Fa(c).getState(),F)},[]),R=fe(function(){return kn(Fa(c).getState())},[]),B=Ne(function(){return{marshal:x,focus:D,contextId:t,canLift:O,isMovementAllowed:R,dragHandleUsageInstructionsId:f,registry:w}},[t,x,f,D,O,R,w]);return OC({contextId:t,store:I,registry:w,customSensors:s,enableDefaultSensors:e.enableDefaultSensors!==!1}),$.useEffect(function(){return v},[v]),A.default.createElement(Ys.Provider,{value:B},A.default.createElement(vy,{context:Qo,store:I},e.children))}var nu=0;function PC(){nu=0}function FC(){return Ne(function(){return""+nu++},[])}function KC(){PC(),ZE()}function au(e){var t=FC(),n=e.dragHandleUsageInstructions||As.dragHandleUsageInstructions;return A.default.createElement(bT,null,function(s){return A.default.createElement(AC,{nonce:e.nonce,contextId:t,setCallbacks:s,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 su=function(t){return function(n){return t===n}},VC=su("scroll"),$C=su("auto"),ru=function(t,n){return n(t.overflowX)||n(t.overflowY)},HC=function(t){var n=window.getComputedStyle(t),s={overflowX:n.overflowX,overflowY:n.overflowY};return ru(s,VC)||ru(s,$C)},WC=function(){return!1},GC=function e(t){return t==null?null:t===document.body?WC()?t:null:t===document.documentElement?null:HC(t)?t:e(t.parentElement)},ai=function(e){return{x:e.scrollLeft,y:e.scrollTop}},UC=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},YC=function(e){var t=GC(e),n=UC(e);return{closestScrollable:t,isFixedOnPage:n}},zC=function(e){var t=e.descriptor,n=e.isEnabled,s=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,c=e.client,l=e.page,p=e.closest,u=function(){if(!p)return null;var S=p.scrollSize,w=p.client,x=Ip({scrollHeight:S.scrollHeight,scrollWidth:S.scrollWidth,height:w.paddingBox.height,width:w.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:w,scrollSize:S,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:x,diff:{value:Xe,displacement:Xe}}}}(),f=i==="vertical"?Mo:Qd,m=ea({page:l,withPlaceholder:null,axis:f,frame:u}),g={descriptor:t,isCombineEnabled:s,isFixedOnPage:o,axis:f,isEnabled:n,client:c,page:l,frame:u,subject:m};return g},jC=function(t,n){var s=Kd(t);if(!n||t!==n)return s;var o=s.paddingBox.top-n.scrollTop,i=s.paddingBox.left-n.scrollLeft,c=o+n.scrollHeight,l=i+n.scrollWidth,p={top:o,right:l,bottom:c,left:i},u=Co(p,s.border),f=Do({borderBox:u,margin:s.margin,border:s.border,padding:s.padding});return f},qC=function(e){var t=e.ref,n=e.descriptor,s=e.env,o=e.windowScroll,i=e.direction,c=e.isDropDisabled,l=e.isCombineEnabled,p=e.shouldClipSubject,u=s.closestScrollable,f=jC(t,u),m=Ls(f,o),g=function(){if(!u)return null;var w=Kd(u),x={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:w,page:Ls(w,o),scroll:ai(u),scrollSize:x,shouldClipSubject:p}}(),S=zC({descriptor:n,isEnabled:!c,isCombineEnabled:l,isFixedOnPage:s.isFixedOnPage,direction:i,client:f,page:m,closest:g});return S},JC={passive:!1},ZC={passive:!0},ou=function(e){return e.shouldPublishImmediately?JC:ZC};function Js(e){var t=$.useContext(e);return t||Q(!1),t}var Zs=function(t){return t&&t.env.closestScrollable||null};function XC(e){var t=$.useRef(null),n=Js(Ys),s=ei("droppable"),o=n.registry,i=n.marshal,c=Gp(e),l=Ne(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),p=$.useRef(l),u=Ne(function(){return Ze(function(N,_){t.current||Q(!1);var O={x:N,y:_};i.updateDroppableScroll(l.id,O)})},[l.id,i]),f=fe(function(){var N=t.current;return!N||!N.env.closestScrollable?Xe:ai(N.env.closestScrollable)},[]),m=fe(function(){var N=f();u(N.x,N.y)},[f,u]),g=Ne(function(){return Ia(m)},[m]),S=fe(function(){var N=t.current,_=Zs(N);N&&_||Q(!1);var O=N.scrollOptions;if(O.shouldPublishImmediately){m();return}g()},[g,m]),w=fe(function(N,_){t.current&&Q(!1);var O=c.current,R=O.getDroppableRef();R||Q(!1);var B=YC(R),F={ref:R,descriptor:l,env:B,scrollOptions:_};t.current=F;var P=qC({ref:R,descriptor:l,env:B,windowScroll:N,direction:O.direction,isDropDisabled:O.isDropDisabled,isCombineEnabled:O.isCombineEnabled,shouldClipSubject:!O.ignoreContainerClipping}),U=B.closestScrollable;return U&&(U.setAttribute(Vp.contextId,n.contextId),U.addEventListener("scroll",S,ou(F.scrollOptions))),P},[n.contextId,l,S,c]),x=fe(function(){var N=t.current,_=Zs(N);return N&&_||Q(!1),ai(_)},[]),E=fe(function(){var N=t.current;N||Q(!1);var _=Zs(N);t.current=null,!!_&&(g.cancel(),_.removeAttribute(Vp.contextId),_.removeEventListener("scroll",S,ou(N.scrollOptions)))},[S,g]),D=fe(function(N){var _=t.current;_||Q(!1);var O=Zs(_);O||Q(!1),O.scrollTop+=N.y,O.scrollLeft+=N.x},[]),I=Ne(function(){return{getDimensionAndWatchScroll:w,getScrollWhileDragging:x,dragStopped:E,scroll:D}},[E,w,x,D]),v=Ne(function(){return{uniqueId:s,descriptor:l,callbacks:I}},[I,l,s]);bt(function(){return p.current=v.descriptor,o.droppable.register(v),function(){t.current&&E(),o.droppable.unregister(v)}},[I,l,E,v,i,o.droppable]),bt(function(){!t.current||i.updateDroppableIsEnabled(p.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),bt(function(){!t.current||i.updateDroppableIsCombineEnabled(p.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function si(){}var iu={width:0,height:0,margin:CT},QC=function(t){var n=t.isAnimatingOpenOnMount,s=t.placeholder,o=t.animate;return n||o==="close"?iu:{height:s.client.borderBox.height,width:s.client.borderBox.width,margin:s.client.margin}},ex=function(t){var n=t.isAnimatingOpenOnMount,s=t.placeholder,o=t.animate,i=QC({isAnimatingOpenOnMount:n,placeholder:s,animate:o});return{display:s.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:o!=="none"?Ba.placeholder:null}};function tx(e){var t=$.useRef(null),n=fe(function(){!t.current||(clearTimeout(t.current),t.current=null)},[]),s=e.animate,o=e.onTransitionEnd,i=e.onClose,c=e.contextId,l=$.useState(e.animate==="open"),p=l[0],u=l[1];$.useEffect(function(){return p?s!=="open"?(n(),u(!1),si):t.current?si:(t.current=setTimeout(function(){t.current=null,u(!1)}),n):si},[s,p,n]);var f=fe(function(g){g.propertyName==="height"&&(o(),s==="close"&&i())},[s,i,o]),m=ex({isAnimatingOpenOnMount:p,animate:e.animate,placeholder:e.placeholder});return A.default.createElement(e.placeholder.tagName,{style:m,"data-rbd-placeholder-context-id":c,onTransitionEnd:f,ref:e.innerRef})}var nx=A.default.memo(tx),ri=A.default.createContext(null),ax=function(e){cd(t,e);function t(){for(var s,o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return s=e.call.apply(e,[this].concat(i))||this,s.state={isVisible:Boolean(s.props.on),data:s.props.on,animate:s.props.shouldAnimate&&s.props.on?"open":"none"},s.onClose=function(){s.state.animate==="close"&&s.setState({isVisible:!1})},s}t.getDerivedStateFromProps=function(o,i){return o.shouldAnimate?o.on?{isVisible:!0,data:o.on,animate:"open"}:i.isVisible?{isVisible:!0,data:i.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(o.on),data:o.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var o={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(o)},t}(A.default.PureComponent),lu={dragging:5e3,dropAnimating:4500},sx=function(t,n){return n?Ba.drop(n.duration):t?Ba.snap:Ba.fluid},rx=function(t,n){return t?n?Oa.opacity.drop:Oa.opacity.combining:null},ox=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function ix(e){var t=e.dimension,n=t.client,s=e.offset,o=e.combineWith,i=e.dropping,c=Boolean(o),l=ox(e),p=Boolean(i),u=p?Wo.drop(s,c):Wo.moveTo(s),f={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:sx(l,i),transform:u,opacity:rx(c,p),zIndex:p?lu.dropAnimating:lu.dragging,pointerEvents:"none"};return f}function lx(e){return{transform:Wo.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function cx(e){return e.type==="DRAGGING"?ix(e):lx(e)}function dx(e,t,n){n===void 0&&(n=Xe);var s=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Fd(o,s),c=Ls(i,n),l={client:i,tagName:t.tagName.toLowerCase(),display:s.display},p={x:i.marginBox.width,y:i.marginBox.height},u={descriptor:e,placeholder:l,displaceBy:p,client:i,page:c};return u}function px(e){var t=ei("draggable"),n=e.descriptor,s=e.registry,o=e.getDraggableRef,i=e.canDragInteractiveElements,c=e.shouldRespectForcePress,l=e.isEnabled,p=Ne(function(){return{canDragInteractiveElements:i,shouldRespectForcePress:c,isEnabled:l}},[i,l,c]),u=fe(function(S){var w=o();return w||Q(!1),dx(n,w,S)},[n,o]),f=Ne(function(){return{uniqueId:t,descriptor:n,options:p,getDimension:u}},[n,u,p,t]),m=$.useRef(f),g=$.useRef(!0);bt(function(){return s.draggable.register(m.current),function(){return s.draggable.unregister(m.current)}},[s.draggable]),bt(function(){if(g.current){g.current=!1;return}var S=m.current;m.current=f,s.draggable.update(f,S)},[f,s.draggable])}function ux(e){e.preventDefault()}function mx(e){var t=$.useRef(null),n=fe(function(F){t.current=F},[]),s=fe(function(){return t.current},[]),o=Js(Ys),i=o.contextId,c=o.dragHandleUsageInstructionsId,l=o.registry,p=Js(ri),u=p.type,f=p.droppableId,m=Ne(function(){return{id:e.draggableId,index:e.index,type:u,droppableId:f}},[e.draggableId,e.index,u,f]),g=e.children,S=e.draggableId,w=e.isEnabled,x=e.shouldRespectForcePress,E=e.canDragInteractiveElements,D=e.isClone,I=e.mapped,v=e.dropAnimationFinished;if(!D){var N=Ne(function(){return{descriptor:m,registry:l,getDraggableRef:s,canDragInteractiveElements:E,shouldRespectForcePress:x,isEnabled:w}},[m,l,s,E,x,w]);px(N)}var _=Ne(function(){return w?{tabIndex:0,role:"button","aria-describedby":c,"data-rbd-drag-handle-draggable-id":S,"data-rbd-drag-handle-context-id":i,draggable:!1,onDragStart:ux}:null},[i,c,S,w]),O=fe(function(F){I.type==="DRAGGING"&&(!I.dropping||F.propertyName==="transform"&&v())},[v,I]),R=Ne(function(){var F=cx(I),P=I.type==="DRAGGING"&&I.dropping?O:null,U={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":i,"data-rbd-draggable-id":S,style:F,onTransitionEnd:P},dragHandleProps:_};return U},[i,_,S,I,O,n]),B=Ne(function(){return{draggableId:m.id,type:m.type,source:{index:m.index,droppableId:m.droppableId}}},[m.droppableId,m.id,m.index,m.type]);return g(R,I.snapshot,B)}var cu=function(e,t){return e===t},du=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},fx=function(t){return t.combine?t.combine.draggableId:null},hx=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function gx(){var e=Ze(function(o,i){return{x:o,y:i}}),t=Ze(function(o,i,c,l,p){return{isDragging:!0,isClone:i,isDropAnimating:Boolean(p),dropAnimation:p,mode:o,draggingOver:c,combineWith:l,combineTargetFor:null}}),n=Ze(function(o,i,c,l,p,u,f){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:u,mode:i,offset:o,dimension:c,forceShouldAnimate:f,snapshot:t(i,l,p,u,null)}}}),s=function(i,c){if(i.isDragging){if(i.critical.draggable.id!==c.draggableId)return null;var l=i.current.client.offset,p=i.dimensions.draggables[c.draggableId],u=St(i.impact),f=hx(i.impact),m=i.forceShouldAnimate;return n(e(l.x,l.y),i.movementMode,p,c.isClone,u,f,m)}if(i.phase==="DROP_ANIMATING"){var g=i.completed;if(g.result.draggableId!==c.draggableId)return null;var S=c.isClone,w=i.dimensions.draggables[c.draggableId],x=g.result,E=x.mode,D=du(x),I=fx(x),v=i.dropDuration,N={duration:v,curve:$o.drop,moveTo:i.newHomeClientOffset,opacity:I?Oa.opacity.drop:null,scale:I?Oa.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:w,dropping:N,draggingOver:D,combineWith:I,mode:E,forceShouldAnimate:null,snapshot:t(E,S,D,I,N)}}}return null};return s}function pu(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var Sx={mapped:{type:"SECONDARY",offset:Xe,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:pu(null)}};function bx(){var e=Ze(function(c,l){return{x:c,y:l}}),t=Ze(pu),n=Ze(function(c,l,p){return l===void 0&&(l=null),{mapped:{type:"SECONDARY",offset:c,combineTargetFor:l,shouldAnimateDisplacement:p,snapshot:t(l)}}}),s=function(l){return l?n(Xe,l,!0):null},o=function(l,p,u,f){var m=u.displaced.visible[l],g=Boolean(f.inVirtualList&&f.effected[l]),S=Ks(u),w=S&&S.draggableId===l?p:null;if(!m){if(!g)return s(w);if(u.displaced.invisible[l])return null;var x=Qn(f.displacedBy.point),E=e(x.x,x.y);return n(E,w,!0)}if(g)return s(w);var D=u.displacedBy.point,I=e(D.x,D.y);return n(I,w,m.shouldAnimate)},i=function(l,p){if(l.isDragging)return l.critical.draggable.id===p.draggableId?null:o(p.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){var u=l.completed;return u.result.draggableId===p.draggableId?null:o(p.draggableId,u.result.draggableId,u.impact,u.afterCritical)}return null};return i}var vx=function(){var t=gx(),n=bx(),s=function(i,c){return t(i,c)||n(i,c)||Sx};return s},yx={dropAnimationFinished:wp},Tx=Od(vx,yx,null,{context:Qo,pure:!0,areStatePropsEqual:cu})(mx);function uu(e){var t=Js(ri),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:A.default.createElement(Tx,e)}function mu(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=Boolean(e.disableInteractiveElementBlocking),s=Boolean(e.shouldRespectForcePress);return A.default.createElement(uu,ue({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:s}))}function wx(e){var t=$.useContext(Ys);t||Q(!1);var n=t.contextId,s=t.isMovementAllowed,o=$.useRef(null),i=$.useRef(null),c=e.children,l=e.droppableId,p=e.type,u=e.mode,f=e.direction,m=e.ignoreContainerClipping,g=e.isDropDisabled,S=e.isCombineEnabled,w=e.snapshot,x=e.useClone,E=e.updateViewportMaxScroll,D=e.getContainerForClone,I=fe(function(){return o.current},[]),v=fe(function(U){o.current=U},[]);fe(function(){return i.current},[]);var N=fe(function(U){i.current=U},[]),_=fe(function(){s()&&E({maxScroll:kp()})},[s,E]);XC({droppableId:l,type:p,mode:u,direction:f,isDropDisabled:g,isCombineEnabled:S,ignoreContainerClipping:m,getDroppableRef:I});var O=A.default.createElement(ax,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(U){var V=U.onClose,W=U.data,pe=U.animate;return A.default.createElement(nx,{placeholder:W,onClose:V,innerRef:N,animate:pe,contextId:n,onTransitionEnd:_})}),R=Ne(function(){return{innerRef:v,placeholder:O,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}},[n,l,O,v]),B=x?x.dragging.draggableId:null,F=Ne(function(){return{droppableId:l,type:p,isUsingCloneFor:B}},[l,B,p]);function P(){if(!x)return null;var U=x.dragging,V=x.render,W=A.default.createElement(uu,{draggableId:U.draggableId,index:U.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(pe,me){return V(pe,me,U)});return tb.default.createPortal(W,D())}return A.default.createElement(ri.Provider,{value:F},c(R,w),P())}var oi=function(t,n){return t===n.droppable.type},fu=function(t,n){return n.draggables[t.draggable.id]},Ex=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ue({},t,{shouldAnimatePlaceholder:!1}),s=Ze(function(c){return{draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}}),o=Ze(function(c,l,p,u,f,m){var g=f.descriptor.id,S=f.descriptor.droppableId===c;if(S){var w=m?{render:m,dragging:s(f.descriptor)}:null,x={isDraggingOver:p,draggingOverWith:p?g:null,draggingFromThisWith:g,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!1,snapshot:x,useClone:w}}if(!l)return n;if(!u)return t;var E={isDraggingOver:p,draggingOverWith:g,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!0,snapshot:E,useClone:null}}),i=function(l,p){var u=p.droppableId,f=p.type,m=!p.isDropDisabled,g=p.renderClone;if(l.isDragging){var S=l.critical;if(!oi(f,S))return n;var w=fu(S,l.dimensions),x=St(l.impact)===u;return o(u,m,x,x,w,g)}if(l.phase==="DROP_ANIMATING"){var E=l.completed;if(!oi(f,E.critical))return n;var D=fu(E.critical,l.dimensions);return o(u,m,du(E.result)===u,St(E.impact)===u,D,g)}if(l.phase==="IDLE"&&l.completed&&!l.shouldFlush){var I=l.completed;if(!oi(f,I.critical))return n;var v=St(I.impact)===u,N=Boolean(I.impact.at&&I.impact.at.type==="COMBINE"),_=I.critical.droppable.id===u;return v?N?t:n:_?t:n}return n};return i},Cx={updateViewportMaxScroll:Aw};function xx(){return document.body||Q(!1),document.body}var Dx={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:xx},ii=Od(Ex,Cx,null,{context:Qo,pure:!0,areStatePropsEqual:cu})(wx);ii.defaultProps=Dx;const Ix={content:"ReactNodeLike",icon:"SpsIcon",title:"string"},Nx=H(k({},Y),{content:y.exports.node,icon:be(M.SpsIcon),title:y.exports.string});function hu(e){const u=e,{content:t,className:n,icon:s,title:o,"data-testid":i,unsafelyReplaceClassName:c}=u,l=z(u,["content","className","icon","title","data-testid","unsafelyReplaceClassName"]),p=K(c||"sps-card__header",n);return a.createElement("div",k({className:p,title:o},l),a.createElement("div",{className:"sps-card__title"}," ",s&&a.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${s}`})," ",o),a.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(hu,{props:Ix,propTypes:Nx,displayName:"SpsCardHeader"});const kx={icon:"SpsIcon",kind:"TagKind"},Mx=H(k({},Y),{icon:be(M.SpsIcon),kind:be(M.TagKind)});function xt(e){const f=e,{children:t,className:n,icon:s,kind:o=M.TagKind.DEFAULT,"data-testid":i,unsafelyReplaceClassName:c}=f,l=z(f,["children","className","icon","kind","data-testid","unsafelyReplaceClassName"]),p=a.Children.toArray(t).filter(m=>typeof m=="string").join(""),u=K(c||"sps-tag",`sps-tag--${o}`,n);return a.createElement("span",k({className:u,"data-testid":`${i}__tag`,title:p},l),s&&a.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${s}`,"data-testid":`${i}__icon`}),t)}Object.assign(xt,{props:kx,propTypes:Mx,displayName:"SpsTag"});const _x={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"},Rx=H(k({},Y),{activateTab:y.exports.func,active:y.exports.bool,icon:be(M.SpsIcon),label:y.exports.string,index:y.exports.number,tag:y.exports.string,tagKind:be(M.TagKind),tagIcon:be(M.SpsIcon)});function li(e){const I=e,{activateTab:t,active:n,children:s,className:o,label:i,icon:c,id:l,index:p,tag:u,tagKind:f,tagIcon:m,"data-testid":g,unsafelyReplaceClassName:S}=I,w=z(I,["activateTab","active","children","className","label","icon","id","index","tag","tagKind","tagIcon","data-testid","unsafelyReplaceClassName"]),x=()=>{t(this,p,s)},E=v=>{(v.key==="Enter"||v.key===" "||v.key==="Spacebar")&&(v.preventDefault(),v.stopPropagation(),t(this,p,s))},D=K(S||"sps-nav__item","sps-nav__link",n&&"active",o);return a.createElement("a",H(k({className:D,onClick:x,"data-toggle":"tab",id:l,role:"tab","aria-controls":l},w),{tabIndex:0,onKeyDown:E}),c&&a.createElement("i",{className:`sps-icon sps-icon-${c}`}),a.createElement("span",null,i),u&&a.createElement(xt,{kind:f||M.TagKind.KEY,icon:m},u))}Object.assign(li,{props:_x,propTypes:Rx,displayName:"SpsCardTabbedPane"});function Lx(e,t,n){const[s,o]=a.useState({index:0,content:null}),i=a.useCallback((c,l,p)=>{o({index:l,content:p})},[]);return a.useEffect(()=>{function c(u){for(const f of u){const m=f.props;o(H(k({},s),{content:m.children}));break}}function l(u,f){for(let m=0;m<=u.length;m+=1){const g=u[m];if(g&&g.props&&(g.props.id&&g.props.id===f||g.props.label&&g.props.label===f)){o({content:g.props.children,index:m});break}}}const p=a.Children.toArray(e);n&&t?l(p,t):n&&c(p)},[t,e]),[s,i]}const Ox={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"},Bx=H(k({},Y),{activeTab:y.exports.string,footer:dt,headerContent:dt,headerIcon:be(M.SpsIcon),headerTitle:y.exports.string});function ci(e){a.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 x=e,{activeTab:t,children:n,className:s,footer:o,headerContent:i,headerIcon:c,headerTitle:l,"data-testid":p,unsafelyReplaceClassName:u}=x,f=z(x,["activeTab","children","className","footer","headerContent","headerIcon","headerTitle","data-testid","unsafelyReplaceClassName"]),m=a.Children.toArray(n).some(E=>a.isValidElement(E)&&E.type===li),[g,S]=Lx(n,t,m),w=K(u||"sps-card",s);return a.createElement("div",H(k({},f),{className:w,"data-testid":`${p}__card`}),(l||i)&&a.createElement(hu,{title:l,content:ft(i),icon:c,"data-testid":`${p}__header`}),m===!0?a.createElement(a.Fragment,null,a.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},a.Children.map(n,(E,D)=>{if(a.isValidElement(E))return a.cloneElement(E,{active:D===g.index,index:D,activateTab:S,"data-testid":`${p}__tab`})})),a.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},g.content)):a.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),o&&a.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},ft(o)))}Object.assign(ci,{props:Ox,propTypes:Bx,displayName:"SpsCard"});const Ax={index:"number",key:"string",columnId:"string",name:"string",value:"string",onDelete:"(columnValue: string) => void",mandatory:"boolean"},Px=H(k({},Y),{index:y.exports.number,key:y.exports.string,columnId:y.exports.string,name:y.exports.string,value:y.exports.string,onDelete:ne(),mandatory:y.exports.bool});function Xs(e){const m=e,{index:t,key:n,columnId:s,name:o,value:i,onDelete:c,mandatory:l,ref:p}=m,u=z(m,["index","key","columnId","name","value","onDelete","mandatory","ref"]),{t:f}=a.useContext(Oe);return a.createElement(mu,k({key:s,draggableId:s,index:t||0},u),g=>a.createElement("div",H(k(k({ref:g.innerRef},g.draggableProps),g.dragHandleProps),{className:"sps-content-row"}),a.createElement("div",{className:"sps-content-row__col-group","data-col-value":i},a.createElement("div",{className:"sps-content-row__col sps-column-chooser__grab-col"},a.createElement("i",{className:"sps-column-chooser__drag-handle"})),a.createElement("div",{className:"sps-content-row__col--borderless"},a.createElement("div",{className:"sps-body-12"},o)),a.createElement("div",{className:"sps-content-row__col sps-column-chooser__delete-col"},!l&&a.createElement(Fe,{"aria-label":f("design-system:columnChooser.removeButton",{elementName:o}),kind:M.ButtonKind.ICON,icon:M.SpsIcon.X,onClick:()=>{c&&c(i)}})))))}Object.assign(Xs,{props:Ax,propTypes:Px,displayName:"SpsColumnChooserColumn"});const Fx={maxSelectedColumns:"number",unselectedColumns:"ColumnProps[]",selectedColumns:"ColumnProps[]",onApplyChanges:"(selectedColumns: ColumnProps[]) => void"},Kx=H(k({},Y),{maxSelectedColumns:y.exports.number,unselectedColumns:y.exports.array,selectedColumns:y.exports.array,onApplyChanges:ne()});function di(e){const E=e,{unselectedColumns:t,selectedColumns:n,maxSelectedColumns:s,onApplyChanges:o,className:i,unsafelyReplaceClassName:c}=E,l=z(E,["unselectedColumns","selectedColumns","maxSelectedColumns","onApplyChanges","className","unsafelyReplaceClassName"]),[p,u]=Kt({isVisible:!1,unselectedColumns:[...t.map(D=>H(k({},D),{label:D.name,columnId:sn()}))],selectedColumns:[...n.map(D=>H(k({},D),{columnId:sn()}))],searchSelectedColumn:null});function f(D){if(D.target.value){const I=[...p.selectedColumns],v=[];p.unselectedColumns.forEach(N=>{D.target.value===N.name?I.push({columnId:sn(),name:N.name,value:N.value}):v.push(N)}),u({selectedColumns:I,unselectedColumns:v,searchSelectedColumn:null})}u({searchSelectedColumn:null})}function m(D){const I=[],v=[...p.unselectedColumns];p.selectedColumns.forEach(N=>{D===N.value?v.push({columnId:sn(),name:N.name,value:N.value}):I.push(N)}),u({selectedColumns:I,unselectedColumns:v})}function g(D){if(!D.destination)return;const I=[...p.selectedColumns],[v]=I.splice(D.source.index,1);I.splice(D.destination.index,0,v),u({selectedColumns:I})}function S(){u({isVisible:!1});const D=p.selectedColumns.map(I=>{const v=k({},I);return v.columnId&&delete v.columnId,v});o(D)}function w(){u({isVisible:!p.isVisible})}const x=K(p.isVisible&&"sps-button--open",i);return a.createElement("div",k({className:"sps-column-chooser z-stratum-dropdown"},l),a.createElement(Fe,{className:x,"aria-label":`${p.isVisible?"Close":"Open"} Column Chooser`,kind:M.ButtonKind.ICON,icon:M.SpsIcon.TABLE,onClick:w,"data-testid":"button"}),p.isVisible&&a.createElement(ci,{"data-testid":"open",footer:()=>a.createElement(Fe,{"aria-label":"Apply Changes",kind:M.ButtonKind.LINK,onClick:S},"Apply Changes")},a.createElement("div",{className:"sps-column-chooser__search-container"},a.createElement(fs,{suggestions:p.unselectedColumns.map(D=>D.name),disabled:s&&p.selectedColumns.length>=s||p.selectedColumns.length>=8,value:p.searchSelectedColumn?p.searchSelectedColumn.name:"",onChange:f,placeholder:"Find Columns to Add"})),a.createElement("div",{className:"sps-column-chooser__selected-title"},"Selected"),a.createElement(au,{onDragEnd:g},a.createElement(ii,{droppableId:"column-chooser"},D=>a.createElement("div",H(k({},D.droppableProps),{ref:D.innerRef}),p.selectedColumns.map((I,v)=>a.createElement(Xs,{index:v,key:I.columnId,columnId:I.columnId,name:I.name,value:I.value,onDelete:m,mandatory:I.mandatory})),D.placeholder)))))}Object.assign(di,{props:Fx,propTypes:Kx,displayName:"SpsColumnChooser"});const gu={basic:{label:"Basic",description:"Column chooser component",examples:{basic:{react:T.code`
|
|
1093
|
+
`}},c=[s,n,o,i];return{always:Pa(c,"always"),resting:Pa(c,"resting"),dragging:Pa(c,"dragging"),dropAnimating:Pa(c,"dropAnimating"),userCancel:Pa(c,"userCancel")}},bt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?H.useLayoutEffect:H.useEffect,Xo=function(){var t=document.querySelector("head");return t||Q(!1),t},$p=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function HE(e,t){var n=Ne(function(){return $E(e)},[e]),s=H.useRef(null),o=H.useRef(null),i=fe(Ze(function(m){var g=o.current;g||Q(!1),g.textContent=m}),[]),c=fe(function(m){var g=s.current;g||Q(!1),g.textContent=m},[]);bt(function(){!s.current&&!o.current||Q(!1);var m=$p(t),g=$p(t);return s.current=m,o.current=g,m.setAttribute(aa+"-always",e),g.setAttribute(aa+"-dynamic",e),Xo().appendChild(m),Xo().appendChild(g),c(n.always),i(n.resting),function(){var S=function(x){var C=x.current;C||Q(!1),Xo().removeChild(C),x.current=null};S(s),S(o)}},[t,c,i,n.always,n.resting,e]);var l=fe(function(){return i(n.dragging)},[i,n.dragging]),p=fe(function(m){if(m==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),u=fe(function(){!o.current||i(n.resting)},[i,n.resting]),f=Ne(function(){return{dragging:l,dropping:p,resting:u}},[l,p,u]);return f}var Hp=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Gs(e){return e instanceof Hp(e).HTMLElement}function WE(e,t){var n="["+sa.contextId+'="'+e+'"]',s=jd(document.querySelectorAll(n));if(!s.length)return null;var o=pn(s,function(i){return i.getAttribute(sa.draggableId)===t});return!o||!Gs(o)?null:o}function GE(e){var t=H.useRef({}),n=H.useRef(null),s=H.useRef(null),o=H.useRef(!1),i=fe(function(g,S){var w={id:g,focus:S};return t.current[g]=w,function(){var C=t.current,D=C[g];D!==w&&delete C[g]}},[]),c=fe(function(g){var S=WE(e,g);S&&S!==document.activeElement&&S.focus()},[e]),l=fe(function(g,S){n.current===g&&(n.current=S)},[]),p=fe(function(){s.current||!o.current||(s.current=requestAnimationFrame(function(){s.current=null;var g=n.current;g&&c(g)}))},[c]),u=fe(function(g){n.current=null;var S=document.activeElement;!S||S.getAttribute(sa.draggableId)===g&&(n.current=g)},[]);bt(function(){return o.current=!0,function(){o.current=!1;var g=s.current;g&&cancelAnimationFrame(g)}},[]);var f=Ne(function(){return{register:i,tryRecordFocus:u,tryRestoreFocusRecorded:p,tryShiftRecord:l}},[i,u,p,l]);return f}function UE(){var e={draggables:{},droppables:{}},t=[];function n(m){return t.push(m),function(){var S=t.indexOf(m);S!==-1&&t.splice(S,1)}}function s(m){t.length&&t.forEach(function(g){return g(m)})}function o(m){return e.draggables[m]||null}function i(m){var g=o(m);return g||Q(!1),g}var c={register:function(g){e.draggables[g.descriptor.id]=g,s({type:"ADDITION",value:g})},update:function(g,S){var w=e.draggables[S.descriptor.id];!w||w.uniqueId===g.uniqueId&&(delete e.draggables[S.descriptor.id],e.draggables[g.descriptor.id]=g)},unregister:function(g){var S=g.descriptor.id,w=o(S);!w||g.uniqueId===w.uniqueId&&(delete e.draggables[S],s({type:"REMOVAL",value:g}))},getById:i,findById:o,exists:function(g){return Boolean(o(g))},getAllByType:function(g){return Ps(e.draggables).filter(function(S){return S.descriptor.type===g})}};function l(m){return e.droppables[m]||null}function p(m){var g=l(m);return g||Q(!1),g}var u={register:function(g){e.droppables[g.descriptor.id]=g},unregister:function(g){var S=l(g.descriptor.id);!S||g.uniqueId===S.uniqueId&&delete e.droppables[g.descriptor.id]},getById:p,findById:l,exists:function(g){return Boolean(l(g))},getAllByType:function(g){return Ps(e.droppables).filter(function(S){return S.descriptor.type===g})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:c,droppable:u,subscribe:n,clean:f}}function YE(){var e=Ne(UE,[]);return H.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Qo=P.default.createContext(null),Us=function(){var e=document.body;return e||Q(!1),e},zE={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},jE=function(t){return"rbd-announcement-"+t};function qE(e){var t=Ne(function(){return jE(e)},[e]),n=H.useRef(null);H.useEffect(function(){var i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),ue(i.style,zE),Us().appendChild(i),function(){setTimeout(function(){var p=Us();p.contains(i)&&p.removeChild(i),i===n.current&&(n.current=null)})}},[t]);var s=fe(function(o){var i=n.current;if(i){i.textContent=o;return}},[]);return s}var Wp=0,JE={separator:"::"};function ZE(){Wp=0}function ei(e,t){return t===void 0&&(t=JE),Ne(function(){return""+e+t.separator+Wp++},[t.separator,e])}function XE(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function QE(e){var t=e.contextId,n=e.text,s=ei("hidden-text",{separator:"-"}),o=Ne(function(){return XE({contextId:t,uniqueId:s})},[s,t]);return H.useEffect(function(){var c=document.createElement("div");return c.id=o,c.textContent=n,c.style.display="none",Us().appendChild(c),function(){var p=Us();p.contains(c)&&p.removeChild(c)}},[o,n]),o}var Ys=P.default.createContext(null);function Gp(e){var t=H.useRef(e);return H.useEffect(function(){t.current=e}),t}function eC(){var e=null;function t(){return Boolean(e)}function n(c){return c===e}function s(c){e&&Q(!1);var l={abandon:c};return e=l,l}function o(){e||Q(!1),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:s,release:o,tryAbandon:i}}var tC=9,nC=13,ti=27,Up=32,aC=33,sC=34,rC=35,oC=36,iC=37,lC=38,cC=39,dC=40,zs,pC=(zs={},zs[nC]=!0,zs[tC]=!0,zs),Yp=function(e){pC[e.keyCode]&&e.preventDefault()},js=function(){var e="visibilitychange";if(typeof document=="undefined")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=pn(t,function(s){return"on"+s in document});return n||e}(),zp=0,jp=5;function uC(e,t){return Math.abs(t.x-e.x)>=jp||Math.abs(t.y-e.y)>=jp}var qp={type:"IDLE"};function mC(e){var t=e.cancel,n=e.completed,s=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(c){var l=c.button,p=c.clientX,u=c.clientY;if(l===zp){var f={x:p,y:u},m=s();if(m.type==="DRAGGING"){c.preventDefault(),m.actions.move(f);return}m.type!=="PENDING"&&Q(!1);var g=m.point;if(!!uC(g,f)){c.preventDefault();var S=m.actions.fluidLift(f);o({type:"DRAGGING",actions:S})}}}},{eventName:"mouseup",fn:function(c){var l=s();if(l.type!=="DRAGGING"){t();return}c.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(c){s().type==="DRAGGING"&&c.preventDefault(),t()}},{eventName:"keydown",fn:function(c){var l=s();if(l.type==="PENDING"){t();return}if(c.keyCode===ti){c.preventDefault(),t();return}Yp(c)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){s().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(c){var l=s();if(l.type==="IDLE"&&Q(!1),l.actions.shouldRespectForcePress()){t();return}c.preventDefault()}},{eventName:js,fn:t}]}function Jp(e){var t=H.useRef(qp),n=H.useRef(cn),s=Ne(function(){return{eventName:"mousedown",fn:function(m){if(!m.defaultPrevented&&m.button===zp&&!(m.ctrlKey||m.metaKey||m.shiftKey||m.altKey)){var g=e.findClosestDraggableId(m);if(!!g){var S=e.tryGetLock(g,c,{sourceEvent:m});if(!!S){m.preventDefault();var w={x:m.clientX,y:m.clientY};n.current(),u(S,w)}}}}}},[e]),o=Ne(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(m){if(!m.defaultPrevented){var g=e.findClosestDraggableId(m);if(!!g){var S=e.findOptionsForDraggable(g);!S||S.shouldRespectForcePress||!e.canGetLock(g)||m.preventDefault()}}}}},[e]),i=fe(function(){var m={passive:!1,capture:!0};n.current=Et(window,[o,s],m)},[o,s]),c=fe(function(){var f=t.current;f.type!=="IDLE"&&(t.current=qp,n.current(),i())},[i]),l=fe(function(){var f=t.current;c(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[c]),p=fe(function(){var m={capture:!0,passive:!1},g=mC({cancel:l,completed:c,getPhase:function(){return t.current},setPhase:function(w){t.current=w}});n.current=Et(window,g,m)},[l,c]),u=fe(function(m,g){t.current.type!=="IDLE"&&Q(!1),t.current={type:"PENDING",point:g,actions:m},p()},[p]);bt(function(){return i(),function(){n.current()}},[i])}var ra;function fC(){}var hC=(ra={},ra[sC]=!0,ra[aC]=!0,ra[oC]=!0,ra[rC]=!0,ra);function gC(e,t){function n(){t(),e.cancel()}function s(){t(),e.drop()}return[{eventName:"keydown",fn:function(i){if(i.keyCode===ti){i.preventDefault(),n();return}if(i.keyCode===Up){i.preventDefault(),s();return}if(i.keyCode===dC){i.preventDefault(),e.moveDown();return}if(i.keyCode===lC){i.preventDefault(),e.moveUp();return}if(i.keyCode===cC){i.preventDefault(),e.moveRight();return}if(i.keyCode===iC){i.preventDefault(),e.moveLeft();return}if(hC[i.keyCode]){i.preventDefault();return}Yp(i)}},{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:js,fn:n}]}function Zp(e){var t=H.useRef(fC),n=Ne(function(){return{eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Up)return;var c=e.findClosestDraggableId(i);if(!c)return;var l=e.tryGetLock(c,f,{sourceEvent:i});if(!l)return;i.preventDefault();var p=!0,u=l.snapLift();t.current();function f(){p||Q(!1),p=!1,t.current(),s()}t.current=Et(window,gC(u,f),{capture:!0,passive:!1})}}},[e]),s=fe(function(){var i={passive:!1,capture:!0};t.current=Et(window,[n],i)},[n]);bt(function(){return s(),function(){t.current()}},[s])}var ni={type:"IDLE"},SC=120,bC=.15;function vC(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(n().type!=="DRAGGING"){t();return}o.keyCode===ti&&o.preventDefault(),t()}},{eventName:js,fn:t}]}function yC(e){var t=e.cancel,n=e.completed,s=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(i){var c=s();if(c.type!=="DRAGGING"){t();return}c.hasMoved=!0;var l=i.touches[0],p=l.clientX,u=l.clientY,f={x:p,y:u};i.preventDefault(),c.actions.move(f)}},{eventName:"touchend",fn:function(i){var c=s();if(c.type!=="DRAGGING"){t();return}i.preventDefault(),c.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(i){if(s().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(i){var c=s();c.type==="IDLE"&&Q(!1);var l=i.touches[0];if(!!l){var p=l.force>=bC;if(!!p){var u=c.actions.shouldRespectForcePress();if(c.type==="PENDING"){u&&t();return}if(u){if(c.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}}}},{eventName:js,fn:t}]}function Xp(e){var t=H.useRef(ni),n=H.useRef(cn),s=fe(function(){return t.current},[]),o=fe(function(S){t.current=S},[]),i=Ne(function(){return{eventName:"touchstart",fn:function(S){if(!S.defaultPrevented){var w=e.findClosestDraggableId(S);if(!!w){var x=e.tryGetLock(w,l,{sourceEvent:S});if(!!x){var C=S.touches[0],D=C.clientX,I=C.clientY,v={x:D,y:I};n.current(),m(x,v)}}}}}},[e]),c=fe(function(){var S={capture:!0,passive:!1};n.current=Et(window,[i],S)},[i]),l=fe(function(){var g=t.current;g.type!=="IDLE"&&(g.type==="PENDING"&&clearTimeout(g.longPressTimerId),o(ni),n.current(),c())},[c,o]),p=fe(function(){var g=t.current;l(),g.type==="DRAGGING"&&g.actions.cancel({shouldBlockNextClick:!0}),g.type==="PENDING"&&g.actions.abort()},[l]),u=fe(function(){var S={capture:!0,passive:!1},w={cancel:p,completed:l,getPhase:s},x=Et(window,yC(w),S),C=Et(window,vC(w),S);n.current=function(){x(),C()}},[p,s,l]),f=fe(function(){var S=s();S.type!=="PENDING"&&Q(!1);var w=S.actions.fluidLift(S.point);o({type:"DRAGGING",actions:w,hasMoved:!1})},[s,o]),m=fe(function(S,w){s().type!=="IDLE"&&Q(!1);var x=setTimeout(f,SC);o({type:"PENDING",point:w,actions:S,longPressTimerId:x}),u()},[u,s,o,f]);bt(function(){return c(),function(){n.current();var w=s();w.type==="PENDING"&&(clearTimeout(w.longPressTimerId),o(ni))}},[s,c,o]),bt(function(){var S=Et(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return S},[])}var TC={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Qp(e,t){if(t==null)return!1;var n=Boolean(TC[t.tagName.toLowerCase()]);if(n)return!0;var s=t.getAttribute("contenteditable");return s==="true"||s===""?!0:t===e?!1:Qp(e,t.parentElement)}function wC(e,t){var n=t.target;return Gs(n)?Qp(e,n):!1}var EC=function(e){return _t(e.getBoundingClientRect()).center};function CC(e){return e instanceof Hp(e).Element}var xC=function(){var e="matches";if(typeof document=="undefined")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=pn(t,function(s){return s in Element.prototype});return n||e}();function eu(e,t){return e==null?null:e[xC](t)?e:eu(e.parentElement,t)}function DC(e,t){return e.closest?e.closest(t):eu(e,t)}function IC(e){return"["+sa.contextId+'="'+e+'"]'}function NC(e,t){var n=t.target;if(!CC(n))return null;var s=IC(e),o=DC(n,s);return!o||!Gs(o)?null:o}function kC(e,t){var n=NC(e,t);return n?n.getAttribute(sa.draggableId):null}function MC(e,t){var n="["+Zo.contextId+'="'+e+'"]',s=jd(document.querySelectorAll(n)),o=pn(s,function(i){return i.getAttribute(Zo.id)===t});return!o||!Gs(o)?null:o}function _C(e){e.preventDefault()}function qs(e){var t=e.expected,n=e.phase,s=e.isLockActive;return e.shouldWarn,!(!s()||t!==n)}function tu(e){var t=e.lockAPI,n=e.store,s=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=s.draggable.findById(o);return!(!i||!i.options.isEnabled||!_p(n.getState(),o))}function RC(e){var t=e.lockAPI,n=e.contextId,s=e.store,o=e.registry,i=e.draggableId,c=e.forceSensorStop,l=e.sourceEvent,p=tu({lockAPI:t,store:s,registry:o,draggableId:i});if(!p)return null;var u=o.draggable.getById(i),f=MC(n,u.descriptor.id);if(!f||l&&!u.options.canDragInteractiveElements&&wC(f,l))return null;var m=t.claim(c||cn),g="PRE_DRAG";function S(){return u.options.shouldRespectForcePress}function w(){return t.isActive(m)}function x(B,M){qs({expected:B,phase:g,isLockActive:w,shouldWarn:!0})&&s.dispatch(M())}var C=x.bind(null,"DRAGGING");function D(B){function M(){t.release(),g="COMPLETED"}g!=="PRE_DRAG"&&(M(),g!=="PRE_DRAG"&&Q(!1)),s.dispatch(Nw(B.liftActionArgs)),g="DRAGGING";function L(F,A){if(A===void 0&&(A={shouldBlockNextClick:!1}),B.cleanup(),A.shouldBlockNextClick){var $=Et(window,[{eventName:"click",fn:_C,options:{once:!0,passive:!1,capture:!0}}]);setTimeout($)}M(),s.dispatch(Tp({reason:F}))}return ue({isActive:function(){return qs({expected:"DRAGGING",phase:g,isLockActive:w,shouldWarn:!1})},shouldRespectForcePress:S,drop:function(A){return L("DROP",A)},cancel:function(A){return L("CANCEL",A)}},B.actions)}function I(B){var M=Ia(function(F){C(function(){return yp({client:F})})}),L=D({liftActionArgs:{id:i,clientSelection:B,movementMode:"FLUID"},cleanup:function(){return M.cancel()},actions:{move:M}});return ue({},L,{move:M})}function v(){var B={moveUp:function(){return C(Pw)},moveRight:function(){return C(Kw)},moveDown:function(){return C(Fw)},moveLeft:function(){return C(Vw)}};return D({liftActionArgs:{id:i,clientSelection:EC(f),movementMode:"SNAP"},cleanup:cn,actions:B})}function k(){var B=qs({expected:"PRE_DRAG",phase:g,isLockActive:w,shouldWarn:!0});B&&t.release()}var R={isActive:function(){return qs({expected:"PRE_DRAG",phase:g,isLockActive:w,shouldWarn:!1})},shouldRespectForcePress:S,fluidLift:I,snapLift:v,abort:k};return R}var LC=[Jp,Zp,Xp];function OC(e){var t=e.contextId,n=e.store,s=e.registry,o=e.customSensors,i=e.enableDefaultSensors,c=[].concat(i?LC:[],o||[]),l=H.useState(function(){return eC()})[0],p=fe(function(I,v){I.isDragging&&!v.isDragging&&l.tryAbandon()},[l]);bt(function(){var I=n.getState(),v=n.subscribe(function(){var k=n.getState();p(I,k),I=k});return v},[l,n,p]),bt(function(){return l.tryAbandon},[l.tryAbandon]);for(var u=fe(function(D){return tu({lockAPI:l,registry:s,store:n,draggableId:D})},[l,s,n]),f=fe(function(D,I,v){return RC({lockAPI:l,registry:s,contextId:t,store:n,draggableId:D,forceSensorStop:I,sourceEvent:v&&v.sourceEvent?v.sourceEvent:null})},[t,l,s,n]),m=fe(function(D){return kC(t,D)},[t]),g=fe(function(D){var I=s.draggable.findById(D);return I?I.options:null},[s.draggable]),S=fe(function(){!l.isClaimed()||(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Ko()))},[l,n]),w=fe(l.isClaimed,[l]),x=Ne(function(){return{canGetLock:u,tryGetLock:f,findClosestDraggableId:m,findOptionsForDraggable:g,tryReleaseLock:S,isLockClaimed:w}},[u,f,m,g,S,w]),C=0;C<c.length;C++)c[C](x)}var BC=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function Fa(e){return e.current||Q(!1),e.current}function AC(e){var t=e.contextId,n=e.setCallbacks,s=e.sensors,o=e.nonce,i=e.dragHandleUsageInstructions,c=H.useRef(null),l=Gp(e),p=fe(function(){return BC(l.current)},[l]),u=qE(t),f=QE({contextId:t,text:i}),m=HE(t,o),g=fe(function(F){Fa(c).dispatch(F)},[]),S=Ne(function(){return gd({publishWhileDragging:Mw,updateDroppableScroll:Rw,updateDroppableIsEnabled:Lw,updateDroppableIsCombineEnabled:Ow,collectionStarting:_w},g)},[g]),w=YE(),x=Ne(function(){return yE(w,S)},[w,S]),C=Ne(function(){return PE(ue({scrollWindow:TE,scrollDroppable:x.scrollDroppable},gd({move:yp},g)))},[x.scrollDroppable,g]),D=GE(t),I=Ne(function(){return gE({announce:u,autoScroller:C,dimensionMarshal:x,focusMarshal:D,getResponders:p,styleMarshal:m})},[u,C,x,D,p,m]);c.current=I;var v=fe(function(){var F=Fa(c),A=F.getState();A.phase!=="IDLE"&&F.dispatch(Ko())},[]),k=fe(function(){var F=Fa(c).getState();return F.isDragging||F.phase==="DROP_ANIMATING"},[]),R=Ne(function(){return{isDragging:k,tryAbort:v}},[k,v]);n(R);var B=fe(function(F){return _p(Fa(c).getState(),F)},[]),M=fe(function(){return kn(Fa(c).getState())},[]),L=Ne(function(){return{marshal:x,focus:D,contextId:t,canLift:B,isMovementAllowed:M,dragHandleUsageInstructionsId:f,registry:w}},[t,x,f,D,B,M,w]);return OC({contextId:t,store:I,registry:w,customSensors:s,enableDefaultSensors:e.enableDefaultSensors!==!1}),H.useEffect(function(){return v},[v]),P.default.createElement(Ys.Provider,{value:L},P.default.createElement(vy,{context:Qo,store:I},e.children))}var nu=0;function PC(){nu=0}function FC(){return Ne(function(){return""+nu++},[])}function KC(){PC(),ZE()}function au(e){var t=FC(),n=e.dragHandleUsageInstructions||As.dragHandleUsageInstructions;return P.default.createElement(bT,null,function(s){return P.default.createElement(AC,{nonce:e.nonce,contextId:t,setCallbacks:s,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 su=function(t){return function(n){return t===n}},VC=su("scroll"),$C=su("auto"),ru=function(t,n){return n(t.overflowX)||n(t.overflowY)},HC=function(t){var n=window.getComputedStyle(t),s={overflowX:n.overflowX,overflowY:n.overflowY};return ru(s,VC)||ru(s,$C)},WC=function(){return!1},GC=function e(t){return t==null?null:t===document.body?WC()?t:null:t===document.documentElement?null:HC(t)?t:e(t.parentElement)},ai=function(e){return{x:e.scrollLeft,y:e.scrollTop}},UC=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},YC=function(e){var t=GC(e),n=UC(e);return{closestScrollable:t,isFixedOnPage:n}},zC=function(e){var t=e.descriptor,n=e.isEnabled,s=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,c=e.client,l=e.page,p=e.closest,u=function(){if(!p)return null;var S=p.scrollSize,w=p.client,x=Ip({scrollHeight:S.scrollHeight,scrollWidth:S.scrollWidth,height:w.paddingBox.height,width:w.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:w,scrollSize:S,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:x,diff:{value:Xe,displacement:Xe}}}}(),f=i==="vertical"?Mo:Qd,m=ea({page:l,withPlaceholder:null,axis:f,frame:u}),g={descriptor:t,isCombineEnabled:s,isFixedOnPage:o,axis:f,isEnabled:n,client:c,page:l,frame:u,subject:m};return g},jC=function(t,n){var s=Kd(t);if(!n||t!==n)return s;var o=s.paddingBox.top-n.scrollTop,i=s.paddingBox.left-n.scrollLeft,c=o+n.scrollHeight,l=i+n.scrollWidth,p={top:o,right:l,bottom:c,left:i},u=Co(p,s.border),f=Do({borderBox:u,margin:s.margin,border:s.border,padding:s.padding});return f},qC=function(e){var t=e.ref,n=e.descriptor,s=e.env,o=e.windowScroll,i=e.direction,c=e.isDropDisabled,l=e.isCombineEnabled,p=e.shouldClipSubject,u=s.closestScrollable,f=jC(t,u),m=Ls(f,o),g=function(){if(!u)return null;var w=Kd(u),x={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:w,page:Ls(w,o),scroll:ai(u),scrollSize:x,shouldClipSubject:p}}(),S=zC({descriptor:n,isEnabled:!c,isCombineEnabled:l,isFixedOnPage:s.isFixedOnPage,direction:i,client:f,page:m,closest:g});return S},JC={passive:!1},ZC={passive:!0},ou=function(e){return e.shouldPublishImmediately?JC:ZC};function Js(e){var t=H.useContext(e);return t||Q(!1),t}var Zs=function(t){return t&&t.env.closestScrollable||null};function XC(e){var t=H.useRef(null),n=Js(Ys),s=ei("droppable"),o=n.registry,i=n.marshal,c=Gp(e),l=Ne(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),p=H.useRef(l),u=Ne(function(){return Ze(function(k,R){t.current||Q(!1);var B={x:k,y:R};i.updateDroppableScroll(l.id,B)})},[l.id,i]),f=fe(function(){var k=t.current;return!k||!k.env.closestScrollable?Xe:ai(k.env.closestScrollable)},[]),m=fe(function(){var k=f();u(k.x,k.y)},[f,u]),g=Ne(function(){return Ia(m)},[m]),S=fe(function(){var k=t.current,R=Zs(k);k&&R||Q(!1);var B=k.scrollOptions;if(B.shouldPublishImmediately){m();return}g()},[g,m]),w=fe(function(k,R){t.current&&Q(!1);var B=c.current,M=B.getDroppableRef();M||Q(!1);var L=YC(M),F={ref:M,descriptor:l,env:L,scrollOptions:R};t.current=F;var A=qC({ref:M,descriptor:l,env:L,windowScroll:k,direction:B.direction,isDropDisabled:B.isDropDisabled,isCombineEnabled:B.isCombineEnabled,shouldClipSubject:!B.ignoreContainerClipping}),$=L.closestScrollable;return $&&($.setAttribute(Vp.contextId,n.contextId),$.addEventListener("scroll",S,ou(F.scrollOptions))),A},[n.contextId,l,S,c]),x=fe(function(){var k=t.current,R=Zs(k);return k&&R||Q(!1),ai(R)},[]),C=fe(function(){var k=t.current;k||Q(!1);var R=Zs(k);t.current=null,!!R&&(g.cancel(),R.removeAttribute(Vp.contextId),R.removeEventListener("scroll",S,ou(k.scrollOptions)))},[S,g]),D=fe(function(k){var R=t.current;R||Q(!1);var B=Zs(R);B||Q(!1),B.scrollTop+=k.y,B.scrollLeft+=k.x},[]),I=Ne(function(){return{getDimensionAndWatchScroll:w,getScrollWhileDragging:x,dragStopped:C,scroll:D}},[C,w,x,D]),v=Ne(function(){return{uniqueId:s,descriptor:l,callbacks:I}},[I,l,s]);bt(function(){return p.current=v.descriptor,o.droppable.register(v),function(){t.current&&C(),o.droppable.unregister(v)}},[I,l,C,v,i,o.droppable]),bt(function(){!t.current||i.updateDroppableIsEnabled(p.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),bt(function(){!t.current||i.updateDroppableIsCombineEnabled(p.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function si(){}var iu={width:0,height:0,margin:CT},QC=function(t){var n=t.isAnimatingOpenOnMount,s=t.placeholder,o=t.animate;return n||o==="close"?iu:{height:s.client.borderBox.height,width:s.client.borderBox.width,margin:s.client.margin}},ex=function(t){var n=t.isAnimatingOpenOnMount,s=t.placeholder,o=t.animate,i=QC({isAnimatingOpenOnMount:n,placeholder:s,animate:o});return{display:s.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:o!=="none"?Ba.placeholder:null}};function tx(e){var t=H.useRef(null),n=fe(function(){!t.current||(clearTimeout(t.current),t.current=null)},[]),s=e.animate,o=e.onTransitionEnd,i=e.onClose,c=e.contextId,l=H.useState(e.animate==="open"),p=l[0],u=l[1];H.useEffect(function(){return p?s!=="open"?(n(),u(!1),si):t.current?si:(t.current=setTimeout(function(){t.current=null,u(!1)}),n):si},[s,p,n]);var f=fe(function(g){g.propertyName==="height"&&(o(),s==="close"&&i())},[s,i,o]),m=ex({isAnimatingOpenOnMount:p,animate:e.animate,placeholder:e.placeholder});return P.default.createElement(e.placeholder.tagName,{style:m,"data-rbd-placeholder-context-id":c,onTransitionEnd:f,ref:e.innerRef})}var nx=P.default.memo(tx),ri=P.default.createContext(null),ax=function(e){cd(t,e);function t(){for(var s,o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return s=e.call.apply(e,[this].concat(i))||this,s.state={isVisible:Boolean(s.props.on),data:s.props.on,animate:s.props.shouldAnimate&&s.props.on?"open":"none"},s.onClose=function(){s.state.animate==="close"&&s.setState({isVisible:!1})},s}t.getDerivedStateFromProps=function(o,i){return o.shouldAnimate?o.on?{isVisible:!0,data:o.on,animate:"open"}:i.isVisible?{isVisible:!0,data:i.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(o.on),data:o.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var o={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(o)},t}(P.default.PureComponent),lu={dragging:5e3,dropAnimating:4500},sx=function(t,n){return n?Ba.drop(n.duration):t?Ba.snap:Ba.fluid},rx=function(t,n){return t?n?Oa.opacity.drop:Oa.opacity.combining:null},ox=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function ix(e){var t=e.dimension,n=t.client,s=e.offset,o=e.combineWith,i=e.dropping,c=Boolean(o),l=ox(e),p=Boolean(i),u=p?Wo.drop(s,c):Wo.moveTo(s),f={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:sx(l,i),transform:u,opacity:rx(c,p),zIndex:p?lu.dropAnimating:lu.dragging,pointerEvents:"none"};return f}function lx(e){return{transform:Wo.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function cx(e){return e.type==="DRAGGING"?ix(e):lx(e)}function dx(e,t,n){n===void 0&&(n=Xe);var s=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Fd(o,s),c=Ls(i,n),l={client:i,tagName:t.tagName.toLowerCase(),display:s.display},p={x:i.marginBox.width,y:i.marginBox.height},u={descriptor:e,placeholder:l,displaceBy:p,client:i,page:c};return u}function px(e){var t=ei("draggable"),n=e.descriptor,s=e.registry,o=e.getDraggableRef,i=e.canDragInteractiveElements,c=e.shouldRespectForcePress,l=e.isEnabled,p=Ne(function(){return{canDragInteractiveElements:i,shouldRespectForcePress:c,isEnabled:l}},[i,l,c]),u=fe(function(S){var w=o();return w||Q(!1),dx(n,w,S)},[n,o]),f=Ne(function(){return{uniqueId:t,descriptor:n,options:p,getDimension:u}},[n,u,p,t]),m=H.useRef(f),g=H.useRef(!0);bt(function(){return s.draggable.register(m.current),function(){return s.draggable.unregister(m.current)}},[s.draggable]),bt(function(){if(g.current){g.current=!1;return}var S=m.current;m.current=f,s.draggable.update(f,S)},[f,s.draggable])}function ux(e){e.preventDefault()}function mx(e){var t=H.useRef(null),n=fe(function(F){t.current=F},[]),s=fe(function(){return t.current},[]),o=Js(Ys),i=o.contextId,c=o.dragHandleUsageInstructionsId,l=o.registry,p=Js(ri),u=p.type,f=p.droppableId,m=Ne(function(){return{id:e.draggableId,index:e.index,type:u,droppableId:f}},[e.draggableId,e.index,u,f]),g=e.children,S=e.draggableId,w=e.isEnabled,x=e.shouldRespectForcePress,C=e.canDragInteractiveElements,D=e.isClone,I=e.mapped,v=e.dropAnimationFinished;if(!D){var k=Ne(function(){return{descriptor:m,registry:l,getDraggableRef:s,canDragInteractiveElements:C,shouldRespectForcePress:x,isEnabled:w}},[m,l,s,C,x,w]);px(k)}var R=Ne(function(){return w?{tabIndex:0,role:"button","aria-describedby":c,"data-rbd-drag-handle-draggable-id":S,"data-rbd-drag-handle-context-id":i,draggable:!1,onDragStart:ux}:null},[i,c,S,w]),B=fe(function(F){I.type==="DRAGGING"&&(!I.dropping||F.propertyName==="transform"&&v())},[v,I]),M=Ne(function(){var F=cx(I),A=I.type==="DRAGGING"&&I.dropping?B:null,$={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":i,"data-rbd-draggable-id":S,style:F,onTransitionEnd:A},dragHandleProps:R};return $},[i,R,S,I,B,n]),L=Ne(function(){return{draggableId:m.id,type:m.type,source:{index:m.index,droppableId:m.droppableId}}},[m.droppableId,m.id,m.index,m.type]);return g(M,I.snapshot,L)}var cu=function(e,t){return e===t},du=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},fx=function(t){return t.combine?t.combine.draggableId:null},hx=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function gx(){var e=Ze(function(o,i){return{x:o,y:i}}),t=Ze(function(o,i,c,l,p){return{isDragging:!0,isClone:i,isDropAnimating:Boolean(p),dropAnimation:p,mode:o,draggingOver:c,combineWith:l,combineTargetFor:null}}),n=Ze(function(o,i,c,l,p,u,f){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:u,mode:i,offset:o,dimension:c,forceShouldAnimate:f,snapshot:t(i,l,p,u,null)}}}),s=function(i,c){if(i.isDragging){if(i.critical.draggable.id!==c.draggableId)return null;var l=i.current.client.offset,p=i.dimensions.draggables[c.draggableId],u=St(i.impact),f=hx(i.impact),m=i.forceShouldAnimate;return n(e(l.x,l.y),i.movementMode,p,c.isClone,u,f,m)}if(i.phase==="DROP_ANIMATING"){var g=i.completed;if(g.result.draggableId!==c.draggableId)return null;var S=c.isClone,w=i.dimensions.draggables[c.draggableId],x=g.result,C=x.mode,D=du(x),I=fx(x),v=i.dropDuration,k={duration:v,curve:$o.drop,moveTo:i.newHomeClientOffset,opacity:I?Oa.opacity.drop:null,scale:I?Oa.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:w,dropping:k,draggingOver:D,combineWith:I,mode:C,forceShouldAnimate:null,snapshot:t(C,S,D,I,k)}}}return null};return s}function pu(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var Sx={mapped:{type:"SECONDARY",offset:Xe,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:pu(null)}};function bx(){var e=Ze(function(c,l){return{x:c,y:l}}),t=Ze(pu),n=Ze(function(c,l,p){return l===void 0&&(l=null),{mapped:{type:"SECONDARY",offset:c,combineTargetFor:l,shouldAnimateDisplacement:p,snapshot:t(l)}}}),s=function(l){return l?n(Xe,l,!0):null},o=function(l,p,u,f){var m=u.displaced.visible[l],g=Boolean(f.inVirtualList&&f.effected[l]),S=Ks(u),w=S&&S.draggableId===l?p:null;if(!m){if(!g)return s(w);if(u.displaced.invisible[l])return null;var x=Qn(f.displacedBy.point),C=e(x.x,x.y);return n(C,w,!0)}if(g)return s(w);var D=u.displacedBy.point,I=e(D.x,D.y);return n(I,w,m.shouldAnimate)},i=function(l,p){if(l.isDragging)return l.critical.draggable.id===p.draggableId?null:o(p.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){var u=l.completed;return u.result.draggableId===p.draggableId?null:o(p.draggableId,u.result.draggableId,u.impact,u.afterCritical)}return null};return i}var vx=function(){var t=gx(),n=bx(),s=function(i,c){return t(i,c)||n(i,c)||Sx};return s},yx={dropAnimationFinished:wp},Tx=Od(vx,yx,null,{context:Qo,pure:!0,areStatePropsEqual:cu})(mx);function uu(e){var t=Js(ri),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:P.default.createElement(Tx,e)}function mu(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=Boolean(e.disableInteractiveElementBlocking),s=Boolean(e.shouldRespectForcePress);return P.default.createElement(uu,ue({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:s}))}function wx(e){var t=H.useContext(Ys);t||Q(!1);var n=t.contextId,s=t.isMovementAllowed,o=H.useRef(null),i=H.useRef(null),c=e.children,l=e.droppableId,p=e.type,u=e.mode,f=e.direction,m=e.ignoreContainerClipping,g=e.isDropDisabled,S=e.isCombineEnabled,w=e.snapshot,x=e.useClone,C=e.updateViewportMaxScroll,D=e.getContainerForClone,I=fe(function(){return o.current},[]),v=fe(function($){o.current=$},[]);fe(function(){return i.current},[]);var k=fe(function($){i.current=$},[]),R=fe(function(){s()&&C({maxScroll:kp()})},[s,C]);XC({droppableId:l,type:p,mode:u,direction:f,isDropDisabled:g,isCombineEnabled:S,ignoreContainerClipping:m,getDroppableRef:I});var B=P.default.createElement(ax,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function($){var V=$.onClose,W=$.data,pe=$.animate;return P.default.createElement(nx,{placeholder:W,onClose:V,innerRef:k,animate:pe,contextId:n,onTransitionEnd:R})}),M=Ne(function(){return{innerRef:v,placeholder:B,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}},[n,l,B,v]),L=x?x.dragging.draggableId:null,F=Ne(function(){return{droppableId:l,type:p,isUsingCloneFor:L}},[l,L,p]);function A(){if(!x)return null;var $=x.dragging,V=x.render,W=P.default.createElement(uu,{draggableId:$.draggableId,index:$.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(pe,me){return V(pe,me,$)});return tb.default.createPortal(W,D())}return P.default.createElement(ri.Provider,{value:F},c(M,w),A())}var oi=function(t,n){return t===n.droppable.type},fu=function(t,n){return n.draggables[t.draggable.id]},Ex=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ue({},t,{shouldAnimatePlaceholder:!1}),s=Ze(function(c){return{draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}}),o=Ze(function(c,l,p,u,f,m){var g=f.descriptor.id,S=f.descriptor.droppableId===c;if(S){var w=m?{render:m,dragging:s(f.descriptor)}:null,x={isDraggingOver:p,draggingOverWith:p?g:null,draggingFromThisWith:g,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!1,snapshot:x,useClone:w}}if(!l)return n;if(!u)return t;var C={isDraggingOver:p,draggingOverWith:g,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!0,snapshot:C,useClone:null}}),i=function(l,p){var u=p.droppableId,f=p.type,m=!p.isDropDisabled,g=p.renderClone;if(l.isDragging){var S=l.critical;if(!oi(f,S))return n;var w=fu(S,l.dimensions),x=St(l.impact)===u;return o(u,m,x,x,w,g)}if(l.phase==="DROP_ANIMATING"){var C=l.completed;if(!oi(f,C.critical))return n;var D=fu(C.critical,l.dimensions);return o(u,m,du(C.result)===u,St(C.impact)===u,D,g)}if(l.phase==="IDLE"&&l.completed&&!l.shouldFlush){var I=l.completed;if(!oi(f,I.critical))return n;var v=St(I.impact)===u,k=Boolean(I.impact.at&&I.impact.at.type==="COMBINE"),R=I.critical.droppable.id===u;return v?k?t:n:R?t:n}return n};return i},Cx={updateViewportMaxScroll:Aw};function xx(){return document.body||Q(!1),document.body}var Dx={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:xx},ii=Od(Ex,Cx,null,{context:Qo,pure:!0,areStatePropsEqual:cu})(wx);ii.defaultProps=Dx;const Ix={content:"ReactNodeLike",icon:"SpsIcon",title:"string"},Nx=G(N({},Y),{content:y.exports.node,icon:be(_.SpsIcon),title:y.exports.string});function hu(e){const u=e,{content:t,className:n,icon:s,title:o,"data-testid":i,unsafelyReplaceClassName:c}=u,l=z(u,["content","className","icon","title","data-testid","unsafelyReplaceClassName"]),p=K(c||"sps-card__header",n);return a.createElement("div",N({className:p,title:o},l),a.createElement("div",{className:"sps-card__title"}," ",s&&a.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${s}`})," ",o),a.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(hu,{props:Ix,propTypes:Nx,displayName:"SpsCardHeader"});const kx={icon:"SpsIcon",kind:"TagKind"},Mx=G(N({},Y),{icon:be(_.SpsIcon),kind:be(_.TagKind)});function xt(e){const f=e,{children:t,className:n,icon:s,kind:o=_.TagKind.DEFAULT,"data-testid":i,unsafelyReplaceClassName:c}=f,l=z(f,["children","className","icon","kind","data-testid","unsafelyReplaceClassName"]),p=a.Children.toArray(t).filter(m=>typeof m=="string").join(""),u=K(c||"sps-tag",`sps-tag--${o}`,n);return a.createElement("span",N({className:u,"data-testid":`${i}__tag`,title:p},l),s&&a.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${s}`,"data-testid":`${i}__icon`}),t)}Object.assign(xt,{props:kx,propTypes:Mx,displayName:"SpsTag"});const _x={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"},Rx=G(N({},Y),{activateTab:y.exports.func,active:y.exports.bool,icon:be(_.SpsIcon),label:y.exports.string,index:y.exports.number,tag:y.exports.string,tagKind:be(_.TagKind),tagIcon:be(_.SpsIcon)});function li(e){const I=e,{activateTab:t,active:n,children:s,className:o,label:i,icon:c,id:l,index:p,tag:u,tagKind:f,tagIcon:m,"data-testid":g,unsafelyReplaceClassName:S}=I,w=z(I,["activateTab","active","children","className","label","icon","id","index","tag","tagKind","tagIcon","data-testid","unsafelyReplaceClassName"]),x=()=>{t(this,p,s)},C=v=>{(v.key==="Enter"||v.key===" "||v.key==="Spacebar")&&(v.preventDefault(),v.stopPropagation(),t(this,p,s))},D=K(S||"sps-nav__item","sps-nav__link",n&&"active",o);return a.createElement("a",G(N({className:D,onClick:x,"data-toggle":"tab",id:l,role:"tab","aria-controls":l},w),{tabIndex:0,onKeyDown:C}),c&&a.createElement("i",{className:`sps-icon sps-icon-${c}`}),a.createElement("span",null,i),u&&a.createElement(xt,{kind:f||_.TagKind.KEY,icon:m},u))}Object.assign(li,{props:_x,propTypes:Rx,displayName:"SpsCardTabbedPane"});function Lx(e,t,n){const[s,o]=a.useState({index:0,content:null}),i=a.useCallback((c,l,p)=>{o({index:l,content:p})},[]);return a.useEffect(()=>{function c(u){for(const f of u){const m=f.props;o(G(N({},s),{content:m.children}));break}}function l(u,f){for(let m=0;m<=u.length;m+=1){const g=u[m];if(g&&g.props&&(g.props.id&&g.props.id===f||g.props.label&&g.props.label===f)){o({content:g.props.children,index:m});break}}}const p=a.Children.toArray(e);n&&t?l(p,t):n&&c(p)},[t,e]),[s,i]}const Ox={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"},Bx=G(N({},Y),{activeTab:y.exports.string,footer:dt,headerContent:dt,headerIcon:be(_.SpsIcon),headerTitle:y.exports.string});function ci(e){a.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 x=e,{activeTab:t,children:n,className:s,footer:o,headerContent:i,headerIcon:c,headerTitle:l,"data-testid":p,unsafelyReplaceClassName:u}=x,f=z(x,["activeTab","children","className","footer","headerContent","headerIcon","headerTitle","data-testid","unsafelyReplaceClassName"]),m=a.Children.toArray(n).some(C=>a.isValidElement(C)&&C.type===li),[g,S]=Lx(n,t,m),w=K(u||"sps-card",s);return a.createElement("div",G(N({},f),{className:w,"data-testid":`${p}__card`}),(l||i)&&a.createElement(hu,{title:l,content:ft(i),icon:c,"data-testid":`${p}__header`}),m===!0?a.createElement(a.Fragment,null,a.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},a.Children.map(n,(C,D)=>{if(a.isValidElement(C))return a.cloneElement(C,{active:D===g.index,index:D,activateTab:S,"data-testid":`${p}__tab`})})),a.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},g.content)):a.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),o&&a.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},ft(o)))}Object.assign(ci,{props:Ox,propTypes:Bx,displayName:"SpsCard"});const Ax={index:"number",key:"string",columnId:"string",name:"string",value:"string",onDelete:"(columnValue: string) => void",mandatory:"boolean"},Px=G(N({},Y),{index:y.exports.number,key:y.exports.string,columnId:y.exports.string,name:y.exports.string,value:y.exports.string,onDelete:ne(),mandatory:y.exports.bool});function Xs(e){const m=e,{index:t,key:n,columnId:s,name:o,value:i,onDelete:c,mandatory:l,ref:p}=m,u=z(m,["index","key","columnId","name","value","onDelete","mandatory","ref"]),{t:f}=a.useContext(Oe);return a.createElement(mu,N({key:s,draggableId:s,index:t||0},u),g=>a.createElement("div",G(N(N({ref:g.innerRef},g.draggableProps),g.dragHandleProps),{className:"sps-content-row"}),a.createElement("div",{className:"sps-content-row__col-group","data-col-value":i},a.createElement("div",{className:"sps-content-row__col sps-column-chooser__grab-col"},a.createElement("i",{className:"sps-column-chooser__drag-handle"})),a.createElement("div",{className:"sps-content-row__col--borderless"},a.createElement("div",{className:"sps-body-12"},o)),a.createElement("div",{className:"sps-content-row__col sps-column-chooser__delete-col"},!l&&a.createElement(Fe,{"aria-label":f("design-system:columnChooser.removeButton",{elementName:o}),kind:_.ButtonKind.ICON,icon:_.SpsIcon.X,onClick:()=>{c&&c(i)}})))))}Object.assign(Xs,{props:Ax,propTypes:Px,displayName:"SpsColumnChooserColumn"});const Fx={maxSelectedColumns:"number",unselectedColumns:"ColumnProps[]",selectedColumns:"ColumnProps[]",onApplyChanges:"(selectedColumns: ColumnProps[]) => void"},Kx=G(N({},Y),{maxSelectedColumns:y.exports.number,unselectedColumns:y.exports.array,selectedColumns:y.exports.array,onApplyChanges:ne()});function di(e){const C=e,{unselectedColumns:t,selectedColumns:n,maxSelectedColumns:s,onApplyChanges:o,className:i,unsafelyReplaceClassName:c}=C,l=z(C,["unselectedColumns","selectedColumns","maxSelectedColumns","onApplyChanges","className","unsafelyReplaceClassName"]),[p,u]=Kt({isVisible:!1,unselectedColumns:[...t.map(D=>G(N({},D),{label:D.name,columnId:sn()}))],selectedColumns:[...n.map(D=>G(N({},D),{columnId:sn()}))],searchSelectedColumn:null});function f(D){if(D.target.value){const I=[...p.selectedColumns],v=[];p.unselectedColumns.forEach(k=>{D.target.value===k.name?I.push({columnId:sn(),name:k.name,value:k.value}):v.push(k)}),u({selectedColumns:I,unselectedColumns:v,searchSelectedColumn:null})}u({searchSelectedColumn:null})}function m(D){const I=[],v=[...p.unselectedColumns];p.selectedColumns.forEach(k=>{D===k.value?v.push({columnId:sn(),name:k.name,value:k.value}):I.push(k)}),u({selectedColumns:I,unselectedColumns:v})}function g(D){if(!D.destination)return;const I=[...p.selectedColumns],[v]=I.splice(D.source.index,1);I.splice(D.destination.index,0,v),u({selectedColumns:I})}function S(){u({isVisible:!1});const D=p.selectedColumns.map(I=>{const v=N({},I);return v.columnId&&delete v.columnId,v});o(D)}function w(){u({isVisible:!p.isVisible})}const x=K(p.isVisible&&"sps-button--open",i);return a.createElement("div",N({className:"sps-column-chooser z-stratum-dropdown"},l),a.createElement(Fe,{className:x,"aria-label":`${p.isVisible?"Close":"Open"} Column Chooser`,kind:_.ButtonKind.ICON,icon:_.SpsIcon.TABLE,onClick:w,"data-testid":"button"}),p.isVisible&&a.createElement(ci,{"data-testid":"open",footer:()=>a.createElement(Fe,{"aria-label":"Apply Changes",kind:_.ButtonKind.LINK,onClick:S},"Apply Changes")},a.createElement("div",{className:"sps-column-chooser__search-container"},a.createElement(fs,{suggestions:p.unselectedColumns.map(D=>D.name),disabled:s&&p.selectedColumns.length>=s||p.selectedColumns.length>=8,value:p.searchSelectedColumn?p.searchSelectedColumn.name:"",onChange:f,placeholder:"Find Columns to Add"})),a.createElement("div",{className:"sps-column-chooser__selected-title"},"Selected"),a.createElement(au,{onDragEnd:g},a.createElement(ii,{droppableId:"column-chooser"},D=>a.createElement("div",G(N({},D.droppableProps),{ref:D.innerRef}),p.selectedColumns.map((I,v)=>a.createElement(Xs,{index:v,key:I.columnId,columnId:I.columnId,name:I.name,value:I.value,onDelete:m,mandatory:I.mandatory})),D.placeholder)))))}Object.assign(di,{props:Fx,propTypes:Kx,displayName:"SpsColumnChooser"});const gu={basic:{label:"Basic",description:"Column chooser component",examples:{basic:{react:T.code`
|
|
1094
1094
|
function DemoComponent() {
|
|
1095
1095
|
const unselectedCols = [
|
|
1096
1096
|
{ name: "Red Fish", value: "Red" },
|
|
@@ -1108,7 +1108,7 @@
|
|
|
1108
1108
|
/>
|
|
1109
1109
|
);
|
|
1110
1110
|
}
|
|
1111
|
-
`}}}},Su={icon:{type:"SpsIcon",required:!0},size:"SpsIconSize"},bu=
|
|
1111
|
+
`}}}},Su={icon:{type:"SpsIcon",required:!0},size:"SpsIconSize"},bu=G(N({},Y),{icon:be(_.SpsIcon).isRequired,size:be(_.SpsIconSize)});function Rt(e){const p=e,{className:t,"data-testid":n,icon:s,size:o=_.SpsIconSize.MEDIUM,unsafelyReplaceClassName:i}=p,c=z(p,["className","data-testid","icon","size","unsafelyReplaceClassName"]),l=K(i||"sps-icon",`sps-icon-${s}`,`sps-icon--${o}`,t);return a.createElement("i",N({className:l,"aria-hidden":"true","data-testid":n},c))}Object.assign(Rt,{props:Su,propTypes:bu,displayName:"SpsI"});Object.assign(Rt,{props:Su,propTypes:bu,displayName:"SpsI"});const Vx={borderless:"boolean",lean:"boolean",leaner:{type:"boolean",deprecated:!0},widthPx:"number",widthRem:"number"},$x=G(N({},Y),{borderless:y.exports.bool,lean:y.exports.bool,leaner:y.exports.bool,widthPx:y.exports.number,widthRem:y.exports.number});function _n(e){const w=e,{borderless:t,children:n,className:s,lean:o,leaner:i,style:c,unsafelyReplaceClassName:l,widthPx:p,widthRem:u}=w,f=z(w,["borderless","children","className","lean","leaner","style","unsafelyReplaceClassName","widthPx","widthRem"]);a.useEffect(()=>{i&&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(" "))},[i]);const m=K(l||"sps-content-row__col",t&&"sps-content-row__col--borderless",(o||i)&&"sps-content-row__col--lean",s),g=p?p/16:u,S=g?G(N({},c),{width:`${g}rem`}):c;return a.createElement("div",G(N({},f),{className:m,style:S}),n)}Object.assign(_n,{props:Vx,propTypes:$x,displayName:"SpsContentRowCol"});const Hx={},Wx=N({},Y);function Qs(e){const l=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName"]),c=K(o||"sps-content-row__expansion",n);return a.createElement("div",G(N({className:c},i),{"data-testid":`${s}__expansion`}),t)}Object.assign(Qs,{props:Hx,propTypes:Wx,displayName:"SpsContentRowExpansion"});const Gx={alternateLayout:"boolean",initiallyExpanded:"boolean",cardSpacing:"boolean",expanded:"boolean",onBeforeCollapsed:"() => boolean",onBeforeExpanded:"() => boolean",onSelectionChange:"ChangeEventHandler",onCollapsed:"() => void",onExpanded:"() => void",selectable:"boolean",selected:"boolean"},Ux=G(N({},Y),{alternateLayout:y.exports.bool,cardSpacing:y.exports.bool,expanded:y.exports.bool,initiallyExpanded:y.exports.bool,onBeforeCollapsed:ne(),onBeforeExpanded:ne(),onSelectionChange:ne(),onCollapsed:ne(),onExpanded:ne(),selectable:y.exports.bool,selected:y.exports.bool});function pi(e){const A=e,{alternateLayout:t=!1,children:n,className:s,expanded:o,onBeforeCollapsed:i,onBeforeExpanded:c,onSelectionChange:l,onCollapsed:p,onExpanded:u,initiallyExpanded:f=!1,cardSpacing:m=!1,selectable:g=!1,selected:S,unsafelyReplaceClassName:w}=A,x=z(A,["alternateLayout","children","className","expanded","onBeforeCollapsed","onBeforeExpanded","onSelectionChange","onCollapsed","onExpanded","initiallyExpanded","cardSpacing","selectable","selected","unsafelyReplaceClassName"]),{t:C}=a.useContext(Oe),[D,I]=a.useState(f),v=typeof o=="boolean"?o:D;function k($){$.stopPropagation(),v&&(!i||i())?(I(!1),p&&p()):!v&&(!c||c())&&(I(!0),u&&u())}const R=()=>a.createElement(In,{checked:S,onChange:l}),B=()=>a.createElement("button",{type:"button",className:"sps-content-row__expand-btn",onClick:k,"aria-label":C(`design-system:contentRow.${v?"collapse":"expand"}`)},a.createElement(Rt,{icon:v?_.SpsIcon.MINUS_CIRCLE:_.SpsIcon.PLUS_CIRCLE})),M=K(w||"sps-content-row",v&&"sps-content-row--expanded",m&&"sps-content-row--card-spaced",S&&"sps-content-row--selected",t&&"sps-content-row--alternate-layout",s),[L,[F]]=Vt(n,[{type:_n},{type:Qs}]);return a.createElement("div",N({className:M},x),a.createElement("div",{className:"sps-content-row__col-group"},g&&!t&&a.createElement(_n,{widthPx:46},R()),F&&!t&&a.createElement(_n,{widthPx:44},B()),F&&g&&t&&a.createElement(_n,{widthPx:46},a.createElement("section",null,R()),a.createElement("section",null,B())),L),F)}Object.assign(pi,{props:Gx,propTypes:Ux,displayName:"SpsContentRow"});const vu={basic:{label:"Content rows",examples:{basic:{react:T.code`
|
|
1112
1112
|
function DemoComponent() {
|
|
1113
1113
|
return (
|
|
1114
1114
|
<SpsContentRow>
|
|
@@ -1500,7 +1500,7 @@
|
|
|
1500
1500
|
</>
|
|
1501
1501
|
)
|
|
1502
1502
|
}
|
|
1503
|
-
`}}}},Yx=Wn.default||Wn;function zx(){return new Array(7).fill(null)}function yu(e){const t=Yx({year:e.year,month:e.month-1,date:1}),n=t.weekday(),s=t.daysInMonth(),o=Math.ceil((s+n)/7),i=o*7,c=new Array(o).fill(!0).map(zx);t.subtract(n,"days");for(let l=0;l<i;l+=1){const p=c[Math.floor(l/7)],u=l%7;p[u]=Object.freeze({year:t.year(),month:t.month()+1,date:t.date()}),u===6&&Object.freeze(p),t.add(1,"day")}return c}function jx(e){const[t,n]=a.useState(()=>yu(e));return a.useEffect(()=>{n(yu(e))},[e]),t}function qx(e){const[t,n]=a.useState(()=>he.toMoment(e));return a.useEffect(()=>n(he.toMoment(e)),[e]),t}const Jx=Wn.default||Wn,Zx=
|
|
1503
|
+
`}}}},Yx=Wn.default||Wn;function zx(){return new Array(7).fill(null)}function yu(e){const t=Yx({year:e.year,month:e.month-1,date:1}),n=t.weekday(),s=t.daysInMonth(),o=Math.ceil((s+n)/7),i=o*7,c=new Array(o).fill(!0).map(zx);t.subtract(n,"days");for(let l=0;l<i;l+=1){const p=c[Math.floor(l/7)],u=l%7;p[u]=Object.freeze({year:t.year(),month:t.month()+1,date:t.date()}),u===6&&Object.freeze(p),t.add(1,"day")}return c}function jx(e){const[t,n]=a.useState(()=>yu(e));return a.useEffect(()=>{n(yu(e))},[e]),t}function qx(e){const[t,n]=a.useState(()=>he.toMoment(e));return a.useEffect(()=>n(he.toMoment(e)),[e]),t}const Jx=Wn.default||Wn,Zx=G(N({},Y),{maxDate:ce(),minDate:ce(),onNewSelection:ne().isRequired,selectedDate:ce(),selectedRange:y.exports.arrayOf(ce())}),Ht="sps-datepicker__calendar";function Tu({maxDate:e,selectedDate:t,selectedRange:n}){const s=n?he.nullifyInvalidDate(n[1])||he.nullifyInvalidDate(n[0]):null;return he.nullifyInvalidDate(t)||s||he.nullifyInvalidDate(e)||he.create()}function ui(e){const M=e,{children:t,className:n,maxDate:s,minDate:o,onNewSelection:i,selectedDate:c,selectedRange:l,"data-testid":p}=M,u=z(M,["children","className","maxDate","minDate","onNewSelection","selectedDate","selectedRange","data-testid"]),{t:f}=a.useContext(Oe),[m,g]=a.useState(()=>Tu(e));a.useEffect(()=>{g(Tu(e))},[c,l,s]);const S=qx(m),w=jx(m),[x,C]=a.useState();function D(){const L=he.prevMonth(G(N({},m),{date:15}));g(L)}function I(){g(he.nextMonth(G(N({},m),{date:15})))}function v(L){L.target&&L.target.classList.contains(`${Ht}-day`)?C(G(N({},m),{date:Number(L.target.textContent)})):(!L.target||!L.target.classList.contains(`${Ht}-row`))&&C(null)}function k(L){const F=`${Ht}-day`;return K(`${Ht}-cell`,L&&m&&L.month===m.month&&F,(he.isSameDate(L,c)&&he.isInRange(L,[o,s])!==!1||l&&he.isSameDate(L,l[0])||he.isInRange(L,l))&&`${F}--selected`,he.isInRange(L,[o,s])===!1&&`${F}--disabled`,l&&l[1]&&he.isSameDate(L,l[0])&&!he.isSameDate(L,l[1])&&`${F}--selection-start`,he.isInRange(L,l,!1)&&`${F}--selection-middle`,l&&he.isSameDate(L,l[1])&&!he.isSameDate(L,l[0])&&`${F}--selection-end`,l&&l[0]&&!l[1]&&(!o&&!s||he.isInRange(x,[o,s]))&&he.isInRange(L,[l[0],x],!1)&&`${F}--pending-selection`)}function R(L){L&&m&&L.month===m.month&&he.isInRange(L,[o,s])!==!1&&i(L)}const B=K(Ht,n);return m?a.createElement("div",G(N({"data-testid":`${p}`,className:B},u),{onMouseOver:v}),a.createElement("div",{className:`${Ht}-head`},a.createElement("button",{"data-testid":`${p}_prev_month`,type:"button",tabIndex:-1,disabled:he.isSameMonth(m,o),title:f("design-system:datepicker.calendar.prevMonth"),className:"sps-datepicker__button sps-datepicker__button-previous-month",onClick:D},a.createElement("i",{className:"sps-icon sps-icon-chevron-left"})),a.createElement("span",{className:`${Ht}-head-label`},a.createElement("span",{className:`${Ht}-head-label-month`},S.format("MMMM")),a.createElement("span",{className:`${Ht}-head-label-year`},m.year)),a.createElement("button",{type:"button","data-testid":`${p}_next_month`,tabIndex:-1,disabled:he.isSameMonth(m,s),title:f("design-system:datepicker.calendar.nextMonth"),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:I},a.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),a.createElement("div",{className:`${Ht}-body`},a.createElement("div",{className:"sps-datepicker__calendar-row"},Jx.weekdaysShort().map(L=>a.createElement("div",{key:L,className:"sps-datepicker__calendar-header-cell"},L))),w.map((L,F)=>a.createElement("div",{key:F,className:"sps-datepicker__calendar-row"},L.map((A,$)=>a.createElement("div",{key:$,className:k(A),onClick:()=>R(A),"data-testid":`${p}_${he.toString(A)}`},A?A.date:"")))))):a.createElement(a.Fragment,null)}Object.assign(ui,{propTypes:Zx,displayName:"SpsDatepickerCalendar"});const wu="sps-datepicker__popup",Xx=G(N({},Y),{attachTo:Ft().isRequired,isOpen:y.exports.bool.isRequired}),mi=a.forwardRef((c,i)=>{var l=c,{attachTo:e,children:t,className:n,isOpen:s}=l,o=z(l,["attachTo","children","className","isOpen"]);const p=i||a.useRef(null),u=zn("sps-datepicker-popup-portal"),f=a.useContext(Mt),[m]=s?Cn(p,e,_.Position.BOTTOM_LEFT,N({},f)):[{}],g=K(wu,"z-stratum-dropdown",s&&`${wu}--open`,n);return u(a.createElement("div",G(N({},o),{className:g,ref:p,style:m}),t))});Object.assign(mi,{propTypes:Xx,displayName:"SpsDatepickerPopup"});const Qx={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDate>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newDate: SimpleDate) => void",value:"SimpleDate"},eD=G(N({},Y),{disabled:y.exports.bool,formMeta:ce(),maxDate:ce(),minDate:ce(),onChange:ne(),value:ce()}),Eu="sps-datepicker";function fi(m){var g=m,{children:e,className:t,disabled:n,formMeta:s,id:o,maxDate:i,minDate:c,onChange:l,value:p,"data-testid":u}=g,f=z(g,["children","className","disabled","formMeta","id","maxDate","minDate","onChange","value","data-testid"]);const{wrapperId:S,controlId:w}=Tt(o,s),x=a.useRef(null),C=a.useRef(null),D=a.useRef(),[I,v]=a.useState(he.toString(p)),{showPopup:k,doShowPopup:R}=Ta(x,C);function B($){s&&(s.setValue($),s.markAsDirty()),l&&l($)}function M($){B($),v(he.toString($)),D&&D.current&&D.current.focus()}function L($){v($.target.value);const V=he.createFrom($.target.value);B(V)}function F(){v(""),B()}const A=K(Eu,"sps-text-input",k&&`${Eu}--open`,t);return a.useEffect(()=>{(!p||he.isValid(p))&&v(he.toString(p))},[p]),a.createElement(a.Fragment,null,a.createElement(it,{id:S,className:A,formMeta:s,inputRef:D,focusInputOnClick:!0,ref:x},a.createElement("div",{className:K("sps-form-control",n&&"disabled")},a.createElement("i",{className:K("sps-text-input__icon","sps-icon","sps-icon-calendar-blank")}),a.createElement("input",N({type:"text",ref:D,className:"sps-text-input__input",id:w,placeholder:os,onChange:L,onClick:R,onFocus:R,value:I,disabled:n,"data-testid":`${u}_date_input`},f)),p&&!n&&a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:F}))),a.createElement(mi,{isOpen:k,attachTo:x,ref:C},a.createElement(ui,{"data-testid":`${u}_calendar`,selectedDate:p,onNewSelection:M,minDate:c,maxDate:i})))}Object.assign(fi,{props:Qx,propTypes:eD,displayName:"SpsDatepicker"});const Cu={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
1504
1504
|
function Component() {
|
|
1505
1505
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
1506
1506
|
date: { year: 2018, month: 10, date: 31 },
|
|
@@ -1566,7 +1566,7 @@
|
|
|
1566
1566
|
</div>
|
|
1567
1567
|
);
|
|
1568
1568
|
}
|
|
1569
|
-
`}}}},tD={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDateRange | DatePreset>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newDateRange: SimpleDateRange | DatePreset) => void",presets:"Array<DatePreset>",value:"SimpleDateRange | DatePreset"},nD=
|
|
1569
|
+
`}}}},tD={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDateRange | DatePreset>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newDateRange: SimpleDateRange | DatePreset) => void",presets:"Array<DatePreset>",value:"SimpleDateRange | DatePreset"},nD=G(N({},Y),{disabled:y.exports.bool,formMeta:ce(),maxDate:ce(),minDate:ce(),onChange:ne(),presets:y.exports.arrayOf(ce())}),xu="sps-datepicker",hi=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function gi(g){var S=g,{children:e,className:t,disabled:n,formMeta:s,id:o,maxDate:i,minDate:c,onChange:l,presets:p=hi,value:u,"data-testid":f}=S,m=z(S,["children","className","disabled","formMeta","id","maxDate","minDate","onChange","presets","value","data-testid"]);const{t:w}=a.useContext(Oe),{wrapperId:x,controlId:C}=Tt(o,s),D=a.useRef(null),I=a.useRef(),v=a.useRef(),[k,R]=a.useState(Array.isArray(u)?he.toStringRange(u):""),[B,M]=a.useState(null),[L,F]=a.useState(),{showPopup:A,doShowPopup:$,doHidePopup:V}=Ta(D,v);function W(ee){s&&(s.setValue(ee),s.markAsDirty()),l&&l(ee)}function pe(ee){const te=u||[];let X;!te[0]||te[1]||he.isBefore(ee,te[0])?X=[ee,null]:(X=[te[0],ee],V(!0),I&&I.current&&I.current.focus()),W(X),R(he.toStringRange(X)),F(null),M(null)}function me(ee){R(ee.target.value);const te=he.createRangeFrom(ee.target.value);W(te),F(null)}function re(){R(""),W(),F(null),M(null)}function se(ee){switch(ee.key){case"Tab":V();break;case"Backspace":ee.target.selectionStart===0&&u&&!Array.isArray(u)&&re();break}}function j(ee){if(!ee){M(null),W(null);return}R(""),M(ee),W(he.createRangeFromPreset(ee))}a.useEffect(()=>{if(!!u&&p!==hi&&Array.isArray(u)){const ee=he.toStringRange(u),te=p.find(X=>ee===he.toStringRange(he.createRangeFromPreset(X)));te&&j(te)}},[]),a.useEffect(()=>{u?Array.isArray(u)&&!B?(u.every(ee=>he.isValid(ee))&&R(he.toStringRange(u)),F(null)):Array.isArray(u)&&B&&R(""):re()},[u,B]);function Z(ee){return ee&&/^design-system:/.test(ee.label)?w(ee.label):ee.label}const oe=K(xu,"sps-text-input",A&&`${xu}--open`,t);return a.createElement(a.Fragment,null,a.createElement(it,{id:x,className:oe,formMeta:s,inputRef:I,focusInputOnClick:!0,ref:D},a.createElement("div",{className:K("sps-form-control",n&&"disabled")},a.createElement("i",{className:K("sps-text-input__icon","sps-icon","sps-icon-calendar")}),B&&a.createElement("div",{"data-testid":`${f}_selected_preset`,className:"sps-datepicker__selected-preset"},a.createElement("span",{className:"sps-tag sps-tag--info"},Z(B))),a.createElement("input",N({type:"text",ref:I,className:"sps-text-input__input","data-testid":`${f}_date_input`,id:C,placeholder:!k&&!B?os:void 0,onChange:me,onClick:$,onFocus:$,onKeyDown:se,value:k,disabled:n},m)),u&&!n&&a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:re}))),a.createElement(mi,{isOpen:A,attachTo:D,ref:v},a.createElement("div",{className:"sps-datepicker__presets"},a.createElement("fieldset",null,a.createElement("legend",{className:"sps-datepicker__presets-label"},w("design-system:datepicker.presetsLabel")),a.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},a.createElement("input",{"data-testid":`${f}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${x}__range-custom`,className:"sps-custom-control__input",checked:!B,name:`sps-date-range-picker-${x}__range`,onChange:()=>j(null)}),a.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${x}__range-custom`},w("design-system:datepicker.preset.custom"))),p.map((ee,te)=>a.createElement("div",{key:Z(ee),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},a.createElement("input",{type:"radio","data-testid":`${f}_preset_option_${ee.label}`,id:`sps-date-range-picker-${x}__range-${te}`,name:`sps-date-range-picker-${x}__range`,onChange:()=>j(ee),checked:(B==null?void 0:B.definition)?B.definition===ee.definition:!1,className:"sps-custom-control__input"}),a.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${x}__range-${te}`},Z(ee)))))),a.createElement(ui,{"data-testid":`${f}_calendar`,selectedRange:Array.isArray(u)?u:L,onNewSelection:pe,minDate:c,maxDate:i})))}Object.assign(gi,{props:tD,propTypes:nD,displayName:"SpsDateRangePicker"});const Du={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
1570
1570
|
function Component() {
|
|
1571
1571
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
1572
1572
|
dateRange: [
|
|
@@ -1677,11 +1677,11 @@
|
|
|
1677
1677
|
</div>
|
|
1678
1678
|
)
|
|
1679
1679
|
}
|
|
1680
|
-
`}}}};var Wt={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(At,function(){var n;function s(){return n.apply(null,arguments)}function o(r){n=r}function i(r){return r instanceof Array||Object.prototype.toString.call(r)==="[object Array]"}function c(r){return r!=null&&Object.prototype.toString.call(r)==="[object Object]"}function l(r,d){return Object.prototype.hasOwnProperty.call(r,d)}function p(r){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(r).length===0;var d;for(d in r)if(l(r,d))return!1;return!0}function u(r){return r===void 0}function f(r){return typeof r=="number"||Object.prototype.toString.call(r)==="[object Number]"}function m(r){return r instanceof Date||Object.prototype.toString.call(r)==="[object Date]"}function g(r,d){var h=[],b;for(b=0;b<r.length;++b)h.push(d(r[b],b));return h}function S(r,d){for(var h in d)l(d,h)&&(r[h]=d[h]);return l(d,"toString")&&(r.toString=d.toString),l(d,"valueOf")&&(r.valueOf=d.valueOf),r}function w(r,d,h,b){return Dl(r,d,h,b,!0).utc()}function x(){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
|
|
1681
|
-
[`+
|
|
1680
|
+
`}}}};var Wt={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(At,function(){var n;function s(){return n.apply(null,arguments)}function o(r){n=r}function i(r){return r instanceof Array||Object.prototype.toString.call(r)==="[object Array]"}function c(r){return r!=null&&Object.prototype.toString.call(r)==="[object Object]"}function l(r,d){return Object.prototype.hasOwnProperty.call(r,d)}function p(r){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(r).length===0;var d;for(d in r)if(l(r,d))return!1;return!0}function u(r){return r===void 0}function f(r){return typeof r=="number"||Object.prototype.toString.call(r)==="[object Number]"}function m(r){return r instanceof Date||Object.prototype.toString.call(r)==="[object Date]"}function g(r,d){var h=[],b;for(b=0;b<r.length;++b)h.push(d(r[b],b));return h}function S(r,d){for(var h in d)l(d,h)&&(r[h]=d[h]);return l(d,"toString")&&(r.toString=d.toString),l(d,"valueOf")&&(r.valueOf=d.valueOf),r}function w(r,d,h,b){return Dl(r,d,h,b,!0).utc()}function x(){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 C(r){return r._pf==null&&(r._pf=x()),r._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(r){var d=Object(this),h=d.length>>>0,b;for(b=0;b<h;b++)if(b in d&&r.call(this,d[b],b,d))return!0;return!1};function I(r){if(r._isValid==null){var d=C(r),h=D.call(d.parsedDateParts,function(E){return E!=null}),b=!isNaN(r._d.getTime())&&d.overflow<0&&!d.empty&&!d.invalidEra&&!d.invalidMonth&&!d.invalidWeekday&&!d.weekdayMismatch&&!d.nullInput&&!d.invalidFormat&&!d.userInvalidated&&(!d.meridiem||d.meridiem&&h);if(r._strict&&(b=b&&d.charsLeftOver===0&&d.unusedTokens.length===0&&d.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(r))r._isValid=b;else return b}return r._isValid}function v(r){var d=w(NaN);return r!=null?S(C(d),r):C(d).userInvalidated=!0,d}var k=s.momentProperties=[],R=!1;function B(r,d){var h,b,E;if(u(d._isAMomentObject)||(r._isAMomentObject=d._isAMomentObject),u(d._i)||(r._i=d._i),u(d._f)||(r._f=d._f),u(d._l)||(r._l=d._l),u(d._strict)||(r._strict=d._strict),u(d._tzm)||(r._tzm=d._tzm),u(d._isUTC)||(r._isUTC=d._isUTC),u(d._offset)||(r._offset=d._offset),u(d._pf)||(r._pf=C(d)),u(d._locale)||(r._locale=d._locale),k.length>0)for(h=0;h<k.length;h++)b=k[h],E=d[b],u(E)||(r[b]=E);return r}function M(r){B(this,r),this._d=new Date(r._d!=null?r._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),R===!1&&(R=!0,s.updateOffset(this),R=!1)}function L(r){return r instanceof M||r!=null&&r._isAMomentObject!=null}function F(r){s.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+r)}function A(r,d){var h=!0;return S(function(){if(s.deprecationHandler!=null&&s.deprecationHandler(null,r),h){var b=[],E,O,U;for(O=0;O<arguments.length;O++){if(E="",typeof arguments[O]=="object"){E+=`
|
|
1681
|
+
[`+O+"] ";for(U in arguments[0])l(arguments[0],U)&&(E+=U+": "+arguments[0][U]+", ");E=E.slice(0,-2)}else E=arguments[O];b.push(E)}F(r+`
|
|
1682
1682
|
Arguments: `+Array.prototype.slice.call(b).join("")+`
|
|
1683
|
-
`+new Error().stack),h=!1}return d.apply(this,arguments)},d)}var U={};function V(r,d){s.deprecationHandler!=null&&s.deprecationHandler(r,d),U[r]||(F(d),U[r]=!0)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null;function W(r){return typeof Function!="undefined"&&r instanceof Function||Object.prototype.toString.call(r)==="[object Function]"}function pe(r){var d,h;for(h in r)l(r,h)&&(d=r[h],W(d)?this[h]=d:this["_"+h]=d);this._config=r,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function me(r,d){var h=S({},r),b;for(b in d)l(d,b)&&(c(r[b])&&c(d[b])?(h[b]={},S(h[b],r[b]),S(h[b],d[b])):d[b]!=null?h[b]=d[b]:delete h[b]);for(b in r)l(r,b)&&!l(d,b)&&c(r[b])&&(h[b]=S({},h[b]));return h}function re(r){r!=null&&this.set(r)}var se;Object.keys?se=Object.keys:se=function(r){var d,h=[];for(d in r)l(r,d)&&h.push(d);return h};var j={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Z(r,d,h){var b=this._calendar[r]||this._calendar.sameElse;return W(b)?b.call(d,h):b}function oe(r,d,h){var b=""+Math.abs(r),C=d-b.length,L=r>=0;return(L?h?"+":"":"-")+Math.pow(10,Math.max(0,C)).toString().substr(1)+b}var ee=/(\[[^\[]*\])|(\\)?([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,te=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,X={},le={};function q(r,d,h,b){var C=b;typeof b=="string"&&(C=function(){return this[b]()}),r&&(le[r]=C),d&&(le[d[0]]=function(){return oe(C.apply(this,arguments),d[1],d[2])}),h&&(le[h]=function(){return this.localeData().ordinal(C.apply(this,arguments),r)})}function ye(r){return r.match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"")}function Ie(r){var d=r.match(ee),h,b;for(h=0,b=d.length;h<b;h++)le[d[h]]?d[h]=le[d[h]]:d[h]=ye(d[h]);return function(C){var L="",G;for(G=0;G<b;G++)L+=W(d[G])?d[G].call(C,r):d[G];return L}}function Ce(r,d){return r.isValid()?(d=we(d,r.localeData()),X[d]=X[d]||Ie(d),X[d](r)):r.localeData().invalidDate()}function we(r,d){var h=5;function b(C){return d.longDateFormat(C)||C}for(te.lastIndex=0;h>=0&&te.test(r);)r=r.replace(te,b),te.lastIndex=0,h-=1;return r}var Ke={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 $e(r){var d=this._longDateFormat[r],h=this._longDateFormat[r.toUpperCase()];return d||!h?d:(this._longDateFormat[r]=h.match(ee).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[r])}var je="Invalid date";function et(){return this._invalidDate}var qe="%d",ut=/\d{1,2}/;function ct(r){return this._ordinal.replace("%d",r)}var vt={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 Ee(r,d,h,b){var C=this._relativeTime[h];return W(C)?C(r,d,h,b):C.replace(/%d/i,r)}function We(r,d){var h=this._relativeTime[r>0?"future":"past"];return W(h)?h(d):h.replace(/%s/i,d)}var Ye={};function Ve(r,d){var h=r.toLowerCase();Ye[h]=Ye[h+"s"]=Ye[d]=r}function Se(r){return typeof r=="string"?Ye[r]||Ye[r.toLowerCase()]:void 0}function He(r){var d={},h,b;for(b in r)l(r,b)&&(h=Se(b),h&&(d[h]=r[b]));return d}var Ae={};function Ge(r,d){Ae[r]=d}function Tr(r){var d=[],h;for(h in r)l(r,h)&&d.push({unit:h,priority:Ae[h]});return d.sort(function(b,C){return b.priority-C.priority}),d}function On(r){return r%4==0&&r%100!=0||r%400==0}function tt(r){return r<0?Math.ceil(r)||0:Math.floor(r)}function Te(r){var d=+r,h=0;return d!==0&&isFinite(d)&&(h=tt(d)),h}function yt(r,d){return function(h){return h!=null?(Bn(this,r,h),s.updateOffset(this,d),this):gn(this,r)}}function gn(r,d){return r.isValid()?r._d["get"+(r._isUTC?"UTC":"")+d]():NaN}function Bn(r,d,h){r.isValid()&&!isNaN(h)&&(d==="FullYear"&&On(r.year())&&r.month()===1&&r.date()===29?(h=Te(h),r._d["set"+(r._isUTC?"UTC":"")+d](h,r.month(),za(h,r.month()))):r._d["set"+(r._isUTC?"UTC":"")+d](h))}function wr(r){return r=Se(r),W(this[r])?this[r]():this}function Er(r,d){if(typeof r=="object"){r=He(r);var h=Tr(r),b;for(b=0;b<h.length;b++)this[h[b].unit](r[h[b].unit])}else if(r=Se(r),W(this[r]))return this[r](d);return this}var $a=/\d/,at=/\d\d/,Ha=/\d{3}/,An=/\d{4}/,ve=/[+-]?\d{6}/,de=/\d\d?/,ot=/\d\d\d\d?/,Sn=/\d\d\d\d\d\d?/,bn=/\d{1,3}/,ia=/\d{1,4}/,Wa=/[+-]?\d{1,6}/,Pn=/\d+/,Ga=/[+-]?\d+/,bf=/Z|[+-]\d\d:?\d\d/gi,Ua=/Z|[+-]\d\d(?::?\d\d)?/gi,vf=/[+-]?\d+(\.\d{1,3})?/,la=/[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,Ya;Ya={};function ie(r,d,h){Ya[r]=W(d)?d:function(b,C){return b&&h?h:d}}function yf(r,d){return l(Ya,r)?Ya[r](d._strict,d._locale):new RegExp(Tf(r))}function Tf(r){return mt(r.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,h,b,C,L){return h||b||C||L}))}function mt(r){return r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Cr={};function _e(r,d){var h,b=d;for(typeof r=="string"&&(r=[r]),f(d)&&(b=function(C,L){L[d]=Te(C)}),h=0;h<r.length;h++)Cr[r[h]]=b}function ca(r,d){_e(r,function(h,b,C,L){C._w=C._w||{},d(h,C._w,C,L)})}function wf(r,d,h){d!=null&&l(Cr,r)&&Cr[r](d,h._a,h,r)}var st=0,Gt=1,Ot=2,ze=3,It=4,Ut=5,vn=6,Ef=7,Cf=8;function xf(r,d){return(r%d+d)%d}var Ue;Array.prototype.indexOf?Ue=Array.prototype.indexOf:Ue=function(r){var d;for(d=0;d<this.length;++d)if(this[d]===r)return d;return-1};function za(r,d){if(isNaN(r)||isNaN(d))return NaN;var h=xf(d,12);return r+=(d-h)/12,h===1?On(r)?29:28:31-h%7%2}q("M",["MM",2],"Mo",function(){return this.month()+1}),q("MMM",0,0,function(r){return this.localeData().monthsShort(this,r)}),q("MMMM",0,0,function(r){return this.localeData().months(this,r)}),Ve("month","M"),Ge("month",8),ie("M",de),ie("MM",de,at),ie("MMM",function(r,d){return d.monthsShortRegex(r)}),ie("MMMM",function(r,d){return d.monthsRegex(r)}),_e(["M","MM"],function(r,d){d[Gt]=Te(r)-1}),_e(["MMM","MMMM"],function(r,d,h,b){var C=h._locale.monthsParse(r,b,h._strict);C!=null?d[Gt]=C:E(h).invalidMonth=r});var Df="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),pl="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ul=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,If=la,Nf=la;function kf(r,d){return r?i(this._months)?this._months[r.month()]:this._months[(this._months.isFormat||ul).test(d)?"format":"standalone"][r.month()]:i(this._months)?this._months:this._months.standalone}function Mf(r,d){return r?i(this._monthsShort)?this._monthsShort[r.month()]:this._monthsShort[ul.test(d)?"format":"standalone"][r.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _f(r,d,h){var b,C,L,G=r.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)L=w([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(L,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(L,"").toLocaleLowerCase();return h?d==="MMM"?(C=Ue.call(this._shortMonthsParse,G),C!==-1?C:null):(C=Ue.call(this._longMonthsParse,G),C!==-1?C:null):d==="MMM"?(C=Ue.call(this._shortMonthsParse,G),C!==-1?C:(C=Ue.call(this._longMonthsParse,G),C!==-1?C:null)):(C=Ue.call(this._longMonthsParse,G),C!==-1?C:(C=Ue.call(this._shortMonthsParse,G),C!==-1?C:null))}function Rf(r,d,h){var b,C,L;if(this._monthsParseExact)return _f.call(this,r,d,h);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(C=w([2e3,b]),h&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(C,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(C,"").replace(".","")+"$","i")),!h&&!this._monthsParse[b]&&(L="^"+this.months(C,"")+"|^"+this.monthsShort(C,""),this._monthsParse[b]=new RegExp(L.replace(".",""),"i")),h&&d==="MMMM"&&this._longMonthsParse[b].test(r))return b;if(h&&d==="MMM"&&this._shortMonthsParse[b].test(r))return b;if(!h&&this._monthsParse[b].test(r))return b}}function ml(r,d){var h;if(!r.isValid())return r;if(typeof d=="string"){if(/^\d+$/.test(d))d=Te(d);else if(d=r.localeData().monthsParse(d),!f(d))return r}return h=Math.min(r.date(),za(r.year(),d)),r._d["set"+(r._isUTC?"UTC":"")+"Month"](d,h),r}function fl(r){return r!=null?(ml(this,r),s.updateOffset(this,!0),this):gn(this,"Month")}function Lf(){return za(this.year(),this.month())}function Of(r){return this._monthsParseExact?(l(this,"_monthsRegex")||hl.call(this),r?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=If),this._monthsShortStrictRegex&&r?this._monthsShortStrictRegex:this._monthsShortRegex)}function Bf(r){return this._monthsParseExact?(l(this,"_monthsRegex")||hl.call(this),r?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Nf),this._monthsStrictRegex&&r?this._monthsStrictRegex:this._monthsRegex)}function hl(){function r(G,ge){return ge.length-G.length}var d=[],h=[],b=[],C,L;for(C=0;C<12;C++)L=w([2e3,C]),d.push(this.monthsShort(L,"")),h.push(this.months(L,"")),b.push(this.months(L,"")),b.push(this.monthsShort(L,""));for(d.sort(r),h.sort(r),b.sort(r),C=0;C<12;C++)d[C]=mt(d[C]),h[C]=mt(h[C]);for(C=0;C<24;C++)b[C]=mt(b[C]);this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}q("Y",0,0,function(){var r=this.year();return r<=9999?oe(r,4):"+"+r}),q(0,["YY",2],0,function(){return this.year()%100}),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),Ve("year","y"),Ge("year",1),ie("Y",Ga),ie("YY",de,at),ie("YYYY",ia,An),ie("YYYYY",Wa,ve),ie("YYYYYY",Wa,ve),_e(["YYYYY","YYYYYY"],st),_e("YYYY",function(r,d){d[st]=r.length===2?s.parseTwoDigitYear(r):Te(r)}),_e("YY",function(r,d){d[st]=s.parseTwoDigitYear(r)}),_e("Y",function(r,d){d[st]=parseInt(r,10)});function da(r){return On(r)?366:365}s.parseTwoDigitYear=function(r){return Te(r)+(Te(r)>68?1900:2e3)};var gl=yt("FullYear",!0);function Af(){return On(this.year())}function Pf(r,d,h,b,C,L,G){var ge;return r<100&&r>=0?(ge=new Date(r+400,d,h,b,C,L,G),isFinite(ge.getFullYear())&&ge.setFullYear(r)):ge=new Date(r,d,h,b,C,L,G),ge}function pa(r){var d,h;return r<100&&r>=0?(h=Array.prototype.slice.call(arguments),h[0]=r+400,d=new Date(Date.UTC.apply(null,h)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(r)):d=new Date(Date.UTC.apply(null,arguments)),d}function ja(r,d,h){var b=7+d-h,C=(7+pa(r,0,b).getUTCDay()-d)%7;return-C+b-1}function Sl(r,d,h,b,C){var L=(7+h-b)%7,G=ja(r,b,C),ge=1+7*(d-1)+L+G,xe,Re;return ge<=0?(xe=r-1,Re=da(xe)+ge):ge>da(r)?(xe=r+1,Re=ge-da(r)):(xe=r,Re=ge),{year:xe,dayOfYear:Re}}function ua(r,d,h){var b=ja(r.year(),d,h),C=Math.floor((r.dayOfYear()-b-1)/7)+1,L,G;return C<1?(G=r.year()-1,L=C+Yt(G,d,h)):C>Yt(r.year(),d,h)?(L=C-Yt(r.year(),d,h),G=r.year()+1):(G=r.year(),L=C),{week:L,year:G}}function Yt(r,d,h){var b=ja(r,d,h),C=ja(r+1,d,h);return(da(r)-b+C)/7}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),Ve("week","w"),Ve("isoWeek","W"),Ge("week",5),Ge("isoWeek",5),ie("w",de),ie("ww",de,at),ie("W",de),ie("WW",de,at),ca(["w","ww","W","WW"],function(r,d,h,b){d[b.substr(0,1)]=Te(r)});function Ff(r){return ua(r,this._week.dow,this._week.doy).week}var Kf={dow:0,doy:6};function Vf(){return this._week.dow}function $f(){return this._week.doy}function Hf(r){var d=this.localeData().week(this);return r==null?d:this.add((r-d)*7,"d")}function Wf(r){var d=ua(this,1,4).week;return r==null?d:this.add((r-d)*7,"d")}q("d",0,"do","day"),q("dd",0,0,function(r){return this.localeData().weekdaysMin(this,r)}),q("ddd",0,0,function(r){return this.localeData().weekdaysShort(this,r)}),q("dddd",0,0,function(r){return this.localeData().weekdays(this,r)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),Ve("day","d"),Ve("weekday","e"),Ve("isoWeekday","E"),Ge("day",11),Ge("weekday",11),Ge("isoWeekday",11),ie("d",de),ie("e",de),ie("E",de),ie("dd",function(r,d){return d.weekdaysMinRegex(r)}),ie("ddd",function(r,d){return d.weekdaysShortRegex(r)}),ie("dddd",function(r,d){return d.weekdaysRegex(r)}),ca(["dd","ddd","dddd"],function(r,d,h,b){var C=h._locale.weekdaysParse(r,b,h._strict);C!=null?d.d=C:E(h).invalidWeekday=r}),ca(["d","e","E"],function(r,d,h,b){d[b]=Te(r)});function Gf(r,d){return typeof r!="string"?r:isNaN(r)?(r=d.weekdaysParse(r),typeof r=="number"?r:null):parseInt(r,10)}function Uf(r,d){return typeof r=="string"?d.weekdaysParse(r)%7||7:isNaN(r)?null:r}function xr(r,d){return r.slice(d,7).concat(r.slice(0,d))}var Yf="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zf="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jf=la,qf=la,Jf=la;function Zf(r,d){var h=i(this._weekdays)?this._weekdays:this._weekdays[r&&r!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return r===!0?xr(h,this._week.dow):r?h[r.day()]:h}function Xf(r){return r===!0?xr(this._weekdaysShort,this._week.dow):r?this._weekdaysShort[r.day()]:this._weekdaysShort}function Qf(r){return r===!0?xr(this._weekdaysMin,this._week.dow):r?this._weekdaysMin[r.day()]:this._weekdaysMin}function eh(r,d,h){var b,C,L,G=r.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)L=w([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(L,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(L,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(L,"").toLocaleLowerCase();return h?d==="dddd"?(C=Ue.call(this._weekdaysParse,G),C!==-1?C:null):d==="ddd"?(C=Ue.call(this._shortWeekdaysParse,G),C!==-1?C:null):(C=Ue.call(this._minWeekdaysParse,G),C!==-1?C:null):d==="dddd"?(C=Ue.call(this._weekdaysParse,G),C!==-1||(C=Ue.call(this._shortWeekdaysParse,G),C!==-1)?C:(C=Ue.call(this._minWeekdaysParse,G),C!==-1?C:null)):d==="ddd"?(C=Ue.call(this._shortWeekdaysParse,G),C!==-1||(C=Ue.call(this._weekdaysParse,G),C!==-1)?C:(C=Ue.call(this._minWeekdaysParse,G),C!==-1?C:null)):(C=Ue.call(this._minWeekdaysParse,G),C!==-1||(C=Ue.call(this._weekdaysParse,G),C!==-1)?C:(C=Ue.call(this._shortWeekdaysParse,G),C!==-1?C:null))}function th(r,d,h){var b,C,L;if(this._weekdaysParseExact)return eh.call(this,r,d,h);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(C=w([2e3,1]).day(b),h&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(C,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(C,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(C,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(L="^"+this.weekdays(C,"")+"|^"+this.weekdaysShort(C,"")+"|^"+this.weekdaysMin(C,""),this._weekdaysParse[b]=new RegExp(L.replace(".",""),"i")),h&&d==="dddd"&&this._fullWeekdaysParse[b].test(r))return b;if(h&&d==="ddd"&&this._shortWeekdaysParse[b].test(r))return b;if(h&&d==="dd"&&this._minWeekdaysParse[b].test(r))return b;if(!h&&this._weekdaysParse[b].test(r))return b}}function nh(r){if(!this.isValid())return r!=null?this:NaN;var d=this._isUTC?this._d.getUTCDay():this._d.getDay();return r!=null?(r=Gf(r,this.localeData()),this.add(r-d,"d")):d}function ah(r){if(!this.isValid())return r!=null?this:NaN;var d=(this.day()+7-this.localeData()._week.dow)%7;return r==null?d:this.add(r-d,"d")}function sh(r){if(!this.isValid())return r!=null?this:NaN;if(r!=null){var d=Uf(r,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function rh(r){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Dr.call(this),r?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=jf),this._weekdaysStrictRegex&&r?this._weekdaysStrictRegex:this._weekdaysRegex)}function oh(r){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Dr.call(this),r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qf),this._weekdaysShortStrictRegex&&r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ih(r){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Dr.call(this),r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Jf),this._weekdaysMinStrictRegex&&r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Dr(){function r(Bt,Zt){return Zt.length-Bt.length}var d=[],h=[],b=[],C=[],L,G,ge,xe,Re;for(L=0;L<7;L++)G=w([2e3,1]).day(L),ge=mt(this.weekdaysMin(G,"")),xe=mt(this.weekdaysShort(G,"")),Re=mt(this.weekdays(G,"")),d.push(ge),h.push(xe),b.push(Re),C.push(ge),C.push(xe),C.push(Re);d.sort(r),h.sort(r),b.sort(r),C.sort(r),this._weekdaysRegex=new RegExp("^("+C.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Ir(){return this.hours()%12||12}function lh(){return this.hours()||24}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Ir),q("k",["kk",2],0,lh),q("hmm",0,0,function(){return""+Ir.apply(this)+oe(this.minutes(),2)}),q("hmmss",0,0,function(){return""+Ir.apply(this)+oe(this.minutes(),2)+oe(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+oe(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+oe(this.minutes(),2)+oe(this.seconds(),2)});function vl(r,d){q(r,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}vl("a",!0),vl("A",!1),Ve("hour","h"),Ge("hour",13);function yl(r,d){return d._meridiemParse}ie("a",yl),ie("A",yl),ie("H",de),ie("h",de),ie("k",de),ie("HH",de,at),ie("hh",de,at),ie("kk",de,at),ie("hmm",ot),ie("hmmss",Sn),ie("Hmm",ot),ie("Hmmss",Sn),_e(["H","HH"],ze),_e(["k","kk"],function(r,d,h){var b=Te(r);d[ze]=b===24?0:b}),_e(["a","A"],function(r,d,h){h._isPm=h._locale.isPM(r),h._meridiem=r}),_e(["h","hh"],function(r,d,h){d[ze]=Te(r),E(h).bigHour=!0}),_e("hmm",function(r,d,h){var b=r.length-2;d[ze]=Te(r.substr(0,b)),d[It]=Te(r.substr(b)),E(h).bigHour=!0}),_e("hmmss",function(r,d,h){var b=r.length-4,C=r.length-2;d[ze]=Te(r.substr(0,b)),d[It]=Te(r.substr(b,2)),d[Ut]=Te(r.substr(C)),E(h).bigHour=!0}),_e("Hmm",function(r,d,h){var b=r.length-2;d[ze]=Te(r.substr(0,b)),d[It]=Te(r.substr(b))}),_e("Hmmss",function(r,d,h){var b=r.length-4,C=r.length-2;d[ze]=Te(r.substr(0,b)),d[It]=Te(r.substr(b,2)),d[Ut]=Te(r.substr(C))});function ch(r){return(r+"").toLowerCase().charAt(0)==="p"}var dh=/[ap]\.?m?\.?/i,ph=yt("Hours",!0);function uh(r,d,h){return r>11?h?"pm":"PM":h?"am":"AM"}var Tl={calendar:j,longDateFormat:Ke,invalidDate:je,ordinal:qe,dayOfMonthOrdinalParse:ut,relativeTime:vt,months:Df,monthsShort:pl,week:Kf,weekdays:Yf,weekdaysMin:zf,weekdaysShort:bl,meridiemParse:dh},Pe={},ma={},fa;function mh(r,d){var h,b=Math.min(r.length,d.length);for(h=0;h<b;h+=1)if(r[h]!==d[h])return h;return b}function wl(r){return r&&r.toLowerCase().replace("_","-")}function fh(r){for(var d=0,h,b,C,L;d<r.length;){for(L=wl(r[d]).split("-"),h=L.length,b=wl(r[d+1]),b=b?b.split("-"):null;h>0;){if(C=qa(L.slice(0,h).join("-")),C)return C;if(b&&b.length>=h&&mh(L,b)>=h-1)break;h--}d++}return fa}function qa(r){var d=null,h;if(Pe[r]===void 0&&!0&&e&&e.exports)try{d=fa._abbr,h=Pt,h("./locale/"+r),tn(d)}catch{Pe[r]=null}return Pe[r]}function tn(r,d){var h;return r&&(u(d)?h=zt(r):h=Nr(r,d),h?fa=h:typeof console!="undefined"&&console.warn&&console.warn("Locale "+r+" not found. Did you forget to load it?")),fa._abbr}function Nr(r,d){if(d!==null){var h,b=Tl;if(d.abbr=r,Pe[r]!=null)V("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=Pe[r]._config;else if(d.parentLocale!=null)if(Pe[d.parentLocale]!=null)b=Pe[d.parentLocale]._config;else if(h=qa(d.parentLocale),h!=null)b=h._config;else return ma[d.parentLocale]||(ma[d.parentLocale]=[]),ma[d.parentLocale].push({name:r,config:d}),null;return Pe[r]=new re(me(b,d)),ma[r]&&ma[r].forEach(function(C){Nr(C.name,C.config)}),tn(r),Pe[r]}else return delete Pe[r],null}function hh(r,d){if(d!=null){var h,b,C=Tl;Pe[r]!=null&&Pe[r].parentLocale!=null?Pe[r].set(me(Pe[r]._config,d)):(b=qa(r),b!=null&&(C=b._config),d=me(C,d),b==null&&(d.abbr=r),h=new re(d),h.parentLocale=Pe[r],Pe[r]=h),tn(r)}else Pe[r]!=null&&(Pe[r].parentLocale!=null?(Pe[r]=Pe[r].parentLocale,r===tn()&&tn(r)):Pe[r]!=null&&delete Pe[r]);return Pe[r]}function zt(r){var d;if(r&&r._locale&&r._locale._abbr&&(r=r._locale._abbr),!r)return fa;if(!i(r)){if(d=qa(r),d)return d;r=[r]}return fh(r)}function gh(){return se(Pe)}function kr(r){var d,h=r._a;return h&&E(r).overflow===-2&&(d=h[Gt]<0||h[Gt]>11?Gt:h[Ot]<1||h[Ot]>za(h[st],h[Gt])?Ot:h[ze]<0||h[ze]>24||h[ze]===24&&(h[It]!==0||h[Ut]!==0||h[vn]!==0)?ze:h[It]<0||h[It]>59?It:h[Ut]<0||h[Ut]>59?Ut:h[vn]<0||h[vn]>999?vn:-1,E(r)._overflowDayOfYear&&(d<st||d>Ot)&&(d=Ot),E(r)._overflowWeeks&&d===-1&&(d=Ef),E(r)._overflowWeekday&&d===-1&&(d=Cf),E(r).overflow=d),r}var Sh=/^\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)?)?$/,bh=/^\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)?)?$/,vh=/Z|[+-]\d\d(?::?\d\d)?/,Ja=[["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]],Mr=[["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/]],yh=/^\/?Date\((-?\d+)/i,Th=/^(?:(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}))$/,wh={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 El(r){var d,h,b=r._i,C=Sh.exec(b)||bh.exec(b),L,G,ge,xe;if(C){for(E(r).iso=!0,d=0,h=Ja.length;d<h;d++)if(Ja[d][1].exec(C[1])){G=Ja[d][0],L=Ja[d][2]!==!1;break}if(G==null){r._isValid=!1;return}if(C[3]){for(d=0,h=Mr.length;d<h;d++)if(Mr[d][1].exec(C[3])){ge=(C[2]||" ")+Mr[d][0];break}if(ge==null){r._isValid=!1;return}}if(!L&&ge!=null){r._isValid=!1;return}if(C[4])if(vh.exec(C[4]))xe="Z";else{r._isValid=!1;return}r._f=G+(ge||"")+(xe||""),Rr(r)}else r._isValid=!1}function Eh(r,d,h,b,C,L){var G=[Ch(r),pl.indexOf(d),parseInt(h,10),parseInt(b,10),parseInt(C,10)];return L&&G.push(parseInt(L,10)),G}function Ch(r){var d=parseInt(r,10);return d<=49?2e3+d:d<=999?1900+d:d}function xh(r){return r.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dh(r,d,h){if(r){var b=bl.indexOf(r),C=new Date(d[0],d[1],d[2]).getDay();if(b!==C)return E(h).weekdayMismatch=!0,h._isValid=!1,!1}return!0}function Ih(r,d,h){if(r)return wh[r];if(d)return 0;var b=parseInt(h,10),C=b%100,L=(b-C)/100;return L*60+C}function Cl(r){var d=Th.exec(xh(r._i)),h;if(d){if(h=Eh(d[4],d[3],d[2],d[5],d[6],d[7]),!Dh(d[1],h,r))return;r._a=h,r._tzm=Ih(d[8],d[9],d[10]),r._d=pa.apply(null,r._a),r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),E(r).rfc2822=!0}else r._isValid=!1}function Nh(r){var d=yh.exec(r._i);if(d!==null){r._d=new Date(+d[1]);return}if(El(r),r._isValid===!1)delete r._isValid;else return;if(Cl(r),r._isValid===!1)delete r._isValid;else return;r._strict?r._isValid=!1:s.createFromInputFallback(r)}s.createFromInputFallback=P("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(r){r._d=new Date(r._i+(r._useUTC?" UTC":""))});function Fn(r,d,h){return r!=null?r:d!=null?d:h}function kh(r){var d=new Date(s.now());return r._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function _r(r){var d,h,b=[],C,L,G;if(!r._d){for(C=kh(r),r._w&&r._a[Ot]==null&&r._a[Gt]==null&&Mh(r),r._dayOfYear!=null&&(G=Fn(r._a[st],C[st]),(r._dayOfYear>da(G)||r._dayOfYear===0)&&(E(r)._overflowDayOfYear=!0),h=pa(G,0,r._dayOfYear),r._a[Gt]=h.getUTCMonth(),r._a[Ot]=h.getUTCDate()),d=0;d<3&&r._a[d]==null;++d)r._a[d]=b[d]=C[d];for(;d<7;d++)r._a[d]=b[d]=r._a[d]==null?d===2?1:0:r._a[d];r._a[ze]===24&&r._a[It]===0&&r._a[Ut]===0&&r._a[vn]===0&&(r._nextDay=!0,r._a[ze]=0),r._d=(r._useUTC?pa:Pf).apply(null,b),L=r._useUTC?r._d.getUTCDay():r._d.getDay(),r._tzm!=null&&r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),r._nextDay&&(r._a[ze]=24),r._w&&typeof r._w.d!="undefined"&&r._w.d!==L&&(E(r).weekdayMismatch=!0)}}function Mh(r){var d,h,b,C,L,G,ge,xe,Re;d=r._w,d.GG!=null||d.W!=null||d.E!=null?(L=1,G=4,h=Fn(d.GG,r._a[st],ua(Le(),1,4).year),b=Fn(d.W,1),C=Fn(d.E,1),(C<1||C>7)&&(xe=!0)):(L=r._locale._week.dow,G=r._locale._week.doy,Re=ua(Le(),L,G),h=Fn(d.gg,r._a[st],Re.year),b=Fn(d.w,Re.week),d.d!=null?(C=d.d,(C<0||C>6)&&(xe=!0)):d.e!=null?(C=d.e+L,(d.e<0||d.e>6)&&(xe=!0)):C=L),b<1||b>Yt(h,L,G)?E(r)._overflowWeeks=!0:xe!=null?E(r)._overflowWeekday=!0:(ge=Sl(h,b,C,L,G),r._a[st]=ge.year,r._dayOfYear=ge.dayOfYear)}s.ISO_8601=function(){},s.RFC_2822=function(){};function Rr(r){if(r._f===s.ISO_8601){El(r);return}if(r._f===s.RFC_2822){Cl(r);return}r._a=[],E(r).empty=!0;var d=""+r._i,h,b,C,L,G,ge=d.length,xe=0,Re;for(C=we(r._f,r._locale).match(ee)||[],h=0;h<C.length;h++)L=C[h],b=(d.match(yf(L,r))||[])[0],b&&(G=d.substr(0,d.indexOf(b)),G.length>0&&E(r).unusedInput.push(G),d=d.slice(d.indexOf(b)+b.length),xe+=b.length),le[L]?(b?E(r).empty=!1:E(r).unusedTokens.push(L),wf(L,b,r)):r._strict&&!b&&E(r).unusedTokens.push(L);E(r).charsLeftOver=ge-xe,d.length>0&&E(r).unusedInput.push(d),r._a[ze]<=12&&E(r).bigHour===!0&&r._a[ze]>0&&(E(r).bigHour=void 0),E(r).parsedDateParts=r._a.slice(0),E(r).meridiem=r._meridiem,r._a[ze]=_h(r._locale,r._a[ze],r._meridiem),Re=E(r).era,Re!==null&&(r._a[st]=r._locale.erasConvertYear(Re,r._a[st])),_r(r),kr(r)}function _h(r,d,h){var b;return h==null?d:r.meridiemHour!=null?r.meridiemHour(d,h):(r.isPM!=null&&(b=r.isPM(h),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function Rh(r){var d,h,b,C,L,G,ge=!1;if(r._f.length===0){E(r).invalidFormat=!0,r._d=new Date(NaN);return}for(C=0;C<r._f.length;C++)L=0,G=!1,d=O({},r),r._useUTC!=null&&(d._useUTC=r._useUTC),d._f=r._f[C],Rr(d),I(d)&&(G=!0),L+=E(d).charsLeftOver,L+=E(d).unusedTokens.length*10,E(d).score=L,ge?L<b&&(b=L,h=d):(b==null||L<b||G)&&(b=L,h=d,G&&(ge=!0));S(r,h||d)}function Lh(r){if(!r._d){var d=He(r._i),h=d.day===void 0?d.date:d.day;r._a=g([d.year,d.month,h,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),_r(r)}}function Oh(r){var d=new R(kr(xl(r)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function xl(r){var d=r._i,h=r._f;return r._locale=r._locale||zt(r._l),d===null||h===void 0&&d===""?v({nullInput:!0}):(typeof d=="string"&&(r._i=d=r._locale.preparse(d)),B(d)?new R(kr(d)):(m(d)?r._d=d:i(h)?Rh(r):h?Rr(r):Bh(r),I(r)||(r._d=null),r))}function Bh(r){var d=r._i;u(d)?r._d=new Date(s.now()):m(d)?r._d=new Date(d.valueOf()):typeof d=="string"?Nh(r):i(d)?(r._a=g(d.slice(0),function(h){return parseInt(h,10)}),_r(r)):c(d)?Lh(r):f(d)?r._d=new Date(d):s.createFromInputFallback(r)}function Dl(r,d,h,b,C){var L={};return(d===!0||d===!1)&&(b=d,d=void 0),(h===!0||h===!1)&&(b=h,h=void 0),(c(r)&&p(r)||i(r)&&r.length===0)&&(r=void 0),L._isAMomentObject=!0,L._useUTC=L._isUTC=C,L._l=h,L._i=r,L._f=d,L._strict=b,Oh(L)}function Le(r,d,h,b){return Dl(r,d,h,b,!1)}var Ah=P("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var r=Le.apply(null,arguments);return this.isValid()&&r.isValid()?r<this?this:r:v()}),Ph=P("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var r=Le.apply(null,arguments);return this.isValid()&&r.isValid()?r>this?this:r:v()});function Il(r,d){var h,b;if(d.length===1&&i(d[0])&&(d=d[0]),!d.length)return Le();for(h=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][r](h))&&(h=d[b]);return h}function Fh(){var r=[].slice.call(arguments,0);return Il("isBefore",r)}function Kh(){var r=[].slice.call(arguments,0);return Il("isAfter",r)}var Vh=function(){return Date.now?Date.now():+new Date},ha=["year","quarter","month","week","day","hour","minute","second","millisecond"];function $h(r){var d,h=!1,b;for(d in r)if(l(r,d)&&!(Ue.call(ha,d)!==-1&&(r[d]==null||!isNaN(r[d]))))return!1;for(b=0;b<ha.length;++b)if(r[ha[b]]){if(h)return!1;parseFloat(r[ha[b]])!==Te(r[ha[b]])&&(h=!0)}return!0}function Hh(){return this._isValid}function Wh(){return Nt(NaN)}function Za(r){var d=He(r),h=d.year||0,b=d.quarter||0,C=d.month||0,L=d.week||d.isoWeek||0,G=d.day||0,ge=d.hour||0,xe=d.minute||0,Re=d.second||0,Bt=d.millisecond||0;this._isValid=$h(d),this._milliseconds=+Bt+Re*1e3+xe*6e4+ge*1e3*60*60,this._days=+G+L*7,this._months=+C+b*3+h*12,this._data={},this._locale=zt(),this._bubble()}function Xa(r){return r instanceof Za}function Lr(r){return r<0?Math.round(-1*r)*-1:Math.round(r)}function Gh(r,d,h){var b=Math.min(r.length,d.length),C=Math.abs(r.length-d.length),L=0,G;for(G=0;G<b;G++)(h&&r[G]!==d[G]||!h&&Te(r[G])!==Te(d[G]))&&L++;return L+C}function Nl(r,d){q(r,0,0,function(){var h=this.utcOffset(),b="+";return h<0&&(h=-h,b="-"),b+oe(~~(h/60),2)+d+oe(~~h%60,2)})}Nl("Z",":"),Nl("ZZ",""),ie("Z",Ua),ie("ZZ",Ua),_e(["Z","ZZ"],function(r,d,h){h._useUTC=!0,h._tzm=Or(Ua,r)});var Uh=/([\+\-]|\d\d)/gi;function Or(r,d){var h=(d||"").match(r),b,C,L;return h===null?null:(b=h[h.length-1]||[],C=(b+"").match(Uh)||["-",0,0],L=+(C[1]*60)+Te(C[2]),L===0?0:C[0]==="+"?L:-L)}function Br(r,d){var h,b;return d._isUTC?(h=d.clone(),b=(B(r)||m(r)?r.valueOf():Le(r).valueOf())-h.valueOf(),h._d.setTime(h._d.valueOf()+b),s.updateOffset(h,!1),h):Le(r).local()}function Ar(r){return-Math.round(r._d.getTimezoneOffset())}s.updateOffset=function(){};function Yh(r,d,h){var b=this._offset||0,C;if(!this.isValid())return r!=null?this:NaN;if(r!=null){if(typeof r=="string"){if(r=Or(Ua,r),r===null)return this}else Math.abs(r)<16&&!h&&(r=r*60);return!this._isUTC&&d&&(C=Ar(this)),this._offset=r,this._isUTC=!0,C!=null&&this.add(C,"m"),b!==r&&(!d||this._changeInProgress?Rl(this,Nt(r-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Ar(this)}function zh(r,d){return r!=null?(typeof r!="string"&&(r=-r),this.utcOffset(r,d),this):-this.utcOffset()}function jh(r){return this.utcOffset(0,r)}function qh(r){return this._isUTC&&(this.utcOffset(0,r),this._isUTC=!1,r&&this.subtract(Ar(this),"m")),this}function Jh(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var r=Or(bf,this._i);r!=null?this.utcOffset(r):this.utcOffset(0,!0)}return this}function Zh(r){return this.isValid()?(r=r?Le(r).utcOffset():0,(this.utcOffset()-r)%60==0):!1}function Xh(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Qh(){if(!u(this._isDSTShifted))return this._isDSTShifted;var r={},d;return O(r,this),r=xl(r),r._a?(d=r._isUTC?w(r._a):Le(r._a),this._isDSTShifted=this.isValid()&&Gh(r._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function eg(){return this.isValid()?!this._isUTC:!1}function tg(){return this.isValid()?this._isUTC:!1}function kl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ng=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ag=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Nt(r,d){var h=r,b=null,C,L,G;return Xa(r)?h={ms:r._milliseconds,d:r._days,M:r._months}:f(r)||!isNaN(+r)?(h={},d?h[d]=+r:h.milliseconds=+r):(b=ng.exec(r))?(C=b[1]==="-"?-1:1,h={y:0,d:Te(b[Ot])*C,h:Te(b[ze])*C,m:Te(b[It])*C,s:Te(b[Ut])*C,ms:Te(Lr(b[vn]*1e3))*C}):(b=ag.exec(r))?(C=b[1]==="-"?-1:1,h={y:yn(b[2],C),M:yn(b[3],C),w:yn(b[4],C),d:yn(b[5],C),h:yn(b[6],C),m:yn(b[7],C),s:yn(b[8],C)}):h==null?h={}:typeof h=="object"&&("from"in h||"to"in h)&&(G=sg(Le(h.from),Le(h.to)),h={},h.ms=G.milliseconds,h.M=G.months),L=new Za(h),Xa(r)&&l(r,"_locale")&&(L._locale=r._locale),Xa(r)&&l(r,"_isValid")&&(L._isValid=r._isValid),L}Nt.fn=Za.prototype,Nt.invalid=Wh;function yn(r,d){var h=r&&parseFloat(r.replace(",","."));return(isNaN(h)?0:h)*d}function Ml(r,d){var h={};return h.months=d.month()-r.month()+(d.year()-r.year())*12,r.clone().add(h.months,"M").isAfter(d)&&--h.months,h.milliseconds=+d-+r.clone().add(h.months,"M"),h}function sg(r,d){var h;return r.isValid()&&d.isValid()?(d=Br(d,r),r.isBefore(d)?h=Ml(r,d):(h=Ml(d,r),h.milliseconds=-h.milliseconds,h.months=-h.months),h):{milliseconds:0,months:0}}function _l(r,d){return function(h,b){var C,L;return b!==null&&!isNaN(+b)&&(V(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."),L=h,h=b,b=L),C=Nt(h,b),Rl(this,C,r),this}}function Rl(r,d,h,b){var C=d._milliseconds,L=Lr(d._days),G=Lr(d._months);!r.isValid()||(b=b==null?!0:b,G&&ml(r,gn(r,"Month")+G*h),L&&Bn(r,"Date",gn(r,"Date")+L*h),C&&r._d.setTime(r._d.valueOf()+C*h),b&&s.updateOffset(r,L||G))}var rg=_l(1,"add"),og=_l(-1,"subtract");function Ll(r){return typeof r=="string"||r instanceof String}function ig(r){return B(r)||m(r)||Ll(r)||f(r)||cg(r)||lg(r)||r===null||r===void 0}function lg(r){var d=c(r)&&!p(r),h=!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"],C,L;for(C=0;C<b.length;C+=1)L=b[C],h=h||l(r,L);return d&&h}function cg(r){var d=i(r),h=!1;return d&&(h=r.filter(function(b){return!f(b)&&Ll(r)}).length===0),d&&h}function dg(r){var d=c(r)&&!p(r),h=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],C,L;for(C=0;C<b.length;C+=1)L=b[C],h=h||l(r,L);return d&&h}function pg(r,d){var h=r.diff(d,"days",!0);return h<-6?"sameElse":h<-1?"lastWeek":h<0?"lastDay":h<1?"sameDay":h<2?"nextDay":h<7?"nextWeek":"sameElse"}function ug(r,d){arguments.length===1&&(arguments[0]?ig(arguments[0])?(r=arguments[0],d=void 0):dg(arguments[0])&&(d=arguments[0],r=void 0):(r=void 0,d=void 0));var h=r||Le(),b=Br(h,this).startOf("day"),C=s.calendarFormat(this,b)||"sameElse",L=d&&(W(d[C])?d[C].call(this,h):d[C]);return this.format(L||this.localeData().calendar(C,this,Le(h)))}function mg(){return new R(this)}function fg(r,d){var h=B(r)?r:Le(r);return this.isValid()&&h.isValid()?(d=Se(d)||"millisecond",d==="millisecond"?this.valueOf()>h.valueOf():h.valueOf()<this.clone().startOf(d).valueOf()):!1}function hg(r,d){var h=B(r)?r:Le(r);return this.isValid()&&h.isValid()?(d=Se(d)||"millisecond",d==="millisecond"?this.valueOf()<h.valueOf():this.clone().endOf(d).valueOf()<h.valueOf()):!1}function gg(r,d,h,b){var C=B(r)?r:Le(r),L=B(d)?d:Le(d);return this.isValid()&&C.isValid()&&L.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(C,h):!this.isBefore(C,h))&&(b[1]===")"?this.isBefore(L,h):!this.isAfter(L,h))):!1}function Sg(r,d){var h=B(r)?r:Le(r),b;return this.isValid()&&h.isValid()?(d=Se(d)||"millisecond",d==="millisecond"?this.valueOf()===h.valueOf():(b=h.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function bg(r,d){return this.isSame(r,d)||this.isAfter(r,d)}function vg(r,d){return this.isSame(r,d)||this.isBefore(r,d)}function yg(r,d,h){var b,C,L;if(!this.isValid())return NaN;if(b=Br(r,this),!b.isValid())return NaN;switch(C=(b.utcOffset()-this.utcOffset())*6e4,d=Se(d),d){case"year":L=Qa(this,b)/12;break;case"month":L=Qa(this,b);break;case"quarter":L=Qa(this,b)/3;break;case"second":L=(this-b)/1e3;break;case"minute":L=(this-b)/6e4;break;case"hour":L=(this-b)/36e5;break;case"day":L=(this-b-C)/864e5;break;case"week":L=(this-b-C)/6048e5;break;default:L=this-b}return h?L:tt(L)}function Qa(r,d){if(r.date()<d.date())return-Qa(d,r);var h=(d.year()-r.year())*12+(d.month()-r.month()),b=r.clone().add(h,"months"),C,L;return d-b<0?(C=r.clone().add(h-1,"months"),L=(d-b)/(b-C)):(C=r.clone().add(h+1,"months"),L=(d-b)/(C-b)),-(h+L)||0}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Tg(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function wg(r){if(!this.isValid())return null;var d=r!==!0,h=d?this.clone().utc():this;return h.year()<0||h.year()>9999?Ce(h,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):W(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ce(h,"Z")):Ce(h,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Eg(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var r="moment",d="",h,b,C,L;return this.isLocal()||(r=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),h="["+r+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",C="-MM-DD[T]HH:mm:ss.SSS",L=d+'[")]',this.format(h+b+C+L)}function Cg(r){r||(r=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var d=Ce(this,r);return this.localeData().postformat(d)}function xg(r,d){return this.isValid()&&(B(r)&&r.isValid()||Le(r).isValid())?Nt({to:this,from:r}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function Dg(r){return this.from(Le(),r)}function Ig(r,d){return this.isValid()&&(B(r)&&r.isValid()||Le(r).isValid())?Nt({from:this,to:r}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function Ng(r){return this.to(Le(),r)}function Ol(r){var d;return r===void 0?this._locale._abbr:(d=zt(r),d!=null&&(this._locale=d),this)}var Bl=P("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(r){return r===void 0?this.localeData():this.locale(r)});function Al(){return this._locale}var es=1e3,Kn=60*es,ts=60*Kn,Pl=(365*400+97)*24*ts;function Vn(r,d){return(r%d+d)%d}function Fl(r,d,h){return r<100&&r>=0?new Date(r+400,d,h)-Pl:new Date(r,d,h).valueOf()}function Kl(r,d,h){return r<100&&r>=0?Date.UTC(r+400,d,h)-Pl:Date.UTC(r,d,h)}function kg(r){var d,h;if(r=Se(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(h=this._isUTC?Kl:Fl,r){case"year":d=h(this.year(),0,1);break;case"quarter":d=h(this.year(),this.month()-this.month()%3,1);break;case"month":d=h(this.year(),this.month(),1);break;case"week":d=h(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=h(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=h(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=Vn(d+(this._isUTC?0:this.utcOffset()*Kn),ts);break;case"minute":d=this._d.valueOf(),d-=Vn(d,Kn);break;case"second":d=this._d.valueOf(),d-=Vn(d,es);break}return this._d.setTime(d),s.updateOffset(this,!0),this}function Mg(r){var d,h;if(r=Se(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(h=this._isUTC?Kl:Fl,r){case"year":d=h(this.year()+1,0,1)-1;break;case"quarter":d=h(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=h(this.year(),this.month()+1,1)-1;break;case"week":d=h(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=h(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=h(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=ts-Vn(d+(this._isUTC?0:this.utcOffset()*Kn),ts)-1;break;case"minute":d=this._d.valueOf(),d+=Kn-Vn(d,Kn)-1;break;case"second":d=this._d.valueOf(),d+=es-Vn(d,es)-1;break}return this._d.setTime(d),s.updateOffset(this,!0),this}function _g(){return this._d.valueOf()-(this._offset||0)*6e4}function Rg(){return Math.floor(this.valueOf()/1e3)}function Lg(){return new Date(this.valueOf())}function Og(){var r=this;return[r.year(),r.month(),r.date(),r.hour(),r.minute(),r.second(),r.millisecond()]}function Bg(){var r=this;return{years:r.year(),months:r.month(),date:r.date(),hours:r.hours(),minutes:r.minutes(),seconds:r.seconds(),milliseconds:r.milliseconds()}}function Ag(){return this.isValid()?this.toISOString():null}function Pg(){return I(this)}function Fg(){return S({},E(this))}function Kg(){return E(this).overflow}function Vg(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}q("N",0,0,"eraAbbr"),q("NN",0,0,"eraAbbr"),q("NNN",0,0,"eraAbbr"),q("NNNN",0,0,"eraName"),q("NNNNN",0,0,"eraNarrow"),q("y",["y",1],"yo","eraYear"),q("y",["yy",2],0,"eraYear"),q("y",["yyy",3],0,"eraYear"),q("y",["yyyy",4],0,"eraYear"),ie("N",Pr),ie("NN",Pr),ie("NNN",Pr),ie("NNNN",Zg),ie("NNNNN",Xg),_e(["N","NN","NNN","NNNN","NNNNN"],function(r,d,h,b){var C=h._locale.erasParse(r,b,h._strict);C?E(h).era=C:E(h).invalidEra=r}),ie("y",Pn),ie("yy",Pn),ie("yyy",Pn),ie("yyyy",Pn),ie("yo",Qg),_e(["y","yy","yyy","yyyy"],st),_e(["yo"],function(r,d,h,b){var C;h._locale._eraYearOrdinalRegex&&(C=r.match(h._locale._eraYearOrdinalRegex)),h._locale.eraYearOrdinalParse?d[st]=h._locale.eraYearOrdinalParse(r,C):d[st]=parseInt(r,10)});function $g(r,d){var h,b,C,L=this._eras||zt("en")._eras;for(h=0,b=L.length;h<b;++h){switch(typeof L[h].since){case"string":C=s(L[h].since).startOf("day"),L[h].since=C.valueOf();break}switch(typeof L[h].until){case"undefined":L[h].until=1/0;break;case"string":C=s(L[h].until).startOf("day").valueOf(),L[h].until=C.valueOf();break}}return L}function Hg(r,d,h){var b,C,L=this.eras(),G,ge,xe;for(r=r.toUpperCase(),b=0,C=L.length;b<C;++b)if(G=L[b].name.toUpperCase(),ge=L[b].abbr.toUpperCase(),xe=L[b].narrow.toUpperCase(),h)switch(d){case"N":case"NN":case"NNN":if(ge===r)return L[b];break;case"NNNN":if(G===r)return L[b];break;case"NNNNN":if(xe===r)return L[b];break}else if([G,ge,xe].indexOf(r)>=0)return L[b]}function Wg(r,d){var h=r.since<=r.until?1:-1;return d===void 0?s(r.since).year():s(r.since).year()+(d-r.offset)*h}function Gg(){var r,d,h,b=this.localeData().eras();for(r=0,d=b.length;r<d;++r)if(h=this.clone().startOf("day").valueOf(),b[r].since<=h&&h<=b[r].until||b[r].until<=h&&h<=b[r].since)return b[r].name;return""}function Ug(){var r,d,h,b=this.localeData().eras();for(r=0,d=b.length;r<d;++r)if(h=this.clone().startOf("day").valueOf(),b[r].since<=h&&h<=b[r].until||b[r].until<=h&&h<=b[r].since)return b[r].narrow;return""}function Yg(){var r,d,h,b=this.localeData().eras();for(r=0,d=b.length;r<d;++r)if(h=this.clone().startOf("day").valueOf(),b[r].since<=h&&h<=b[r].until||b[r].until<=h&&h<=b[r].since)return b[r].abbr;return""}function zg(){var r,d,h,b,C=this.localeData().eras();for(r=0,d=C.length;r<d;++r)if(h=C[r].since<=C[r].until?1:-1,b=this.clone().startOf("day").valueOf(),C[r].since<=b&&b<=C[r].until||C[r].until<=b&&b<=C[r].since)return(this.year()-s(C[r].since).year())*h+C[r].offset;return this.year()}function jg(r){return l(this,"_erasNameRegex")||Fr.call(this),r?this._erasNameRegex:this._erasRegex}function qg(r){return l(this,"_erasAbbrRegex")||Fr.call(this),r?this._erasAbbrRegex:this._erasRegex}function Jg(r){return l(this,"_erasNarrowRegex")||Fr.call(this),r?this._erasNarrowRegex:this._erasRegex}function Pr(r,d){return d.erasAbbrRegex(r)}function Zg(r,d){return d.erasNameRegex(r)}function Xg(r,d){return d.erasNarrowRegex(r)}function Qg(r,d){return d._eraYearOrdinalRegex||Pn}function Fr(){var r=[],d=[],h=[],b=[],C,L,G=this.eras();for(C=0,L=G.length;C<L;++C)d.push(mt(G[C].name)),r.push(mt(G[C].abbr)),h.push(mt(G[C].narrow)),b.push(mt(G[C].name)),b.push(mt(G[C].abbr)),b.push(mt(G[C].narrow));this._erasRegex=new RegExp("^("+b.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+d.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+h.join("|")+")","i")}q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ns(r,d){q(0,[r,r.length],0,d)}ns("gggg","weekYear"),ns("ggggg","weekYear"),ns("GGGG","isoWeekYear"),ns("GGGGG","isoWeekYear"),Ve("weekYear","gg"),Ve("isoWeekYear","GG"),Ge("weekYear",1),Ge("isoWeekYear",1),ie("G",Ga),ie("g",Ga),ie("GG",de,at),ie("gg",de,at),ie("GGGG",ia,An),ie("gggg",ia,An),ie("GGGGG",Wa,ve),ie("ggggg",Wa,ve),ca(["gggg","ggggg","GGGG","GGGGG"],function(r,d,h,b){d[b.substr(0,2)]=Te(r)}),ca(["gg","GG"],function(r,d,h,b){d[b]=s.parseTwoDigitYear(r)});function eS(r){return Vl.call(this,r,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function tS(r){return Vl.call(this,r,this.isoWeek(),this.isoWeekday(),1,4)}function nS(){return Yt(this.year(),1,4)}function aS(){return Yt(this.isoWeekYear(),1,4)}function sS(){var r=this.localeData()._week;return Yt(this.year(),r.dow,r.doy)}function rS(){var r=this.localeData()._week;return Yt(this.weekYear(),r.dow,r.doy)}function Vl(r,d,h,b,C){var L;return r==null?ua(this,b,C).year:(L=Yt(r,b,C),d>L&&(d=L),oS.call(this,r,d,h,b,C))}function oS(r,d,h,b,C){var L=Sl(r,d,h,b,C),G=pa(L.year,0,L.dayOfYear);return this.year(G.getUTCFullYear()),this.month(G.getUTCMonth()),this.date(G.getUTCDate()),this}q("Q",0,"Qo","quarter"),Ve("quarter","Q"),Ge("quarter",7),ie("Q",$a),_e("Q",function(r,d){d[Gt]=(Te(r)-1)*3});function iS(r){return r==null?Math.ceil((this.month()+1)/3):this.month((r-1)*3+this.month()%3)}q("D",["DD",2],"Do","date"),Ve("date","D"),Ge("date",9),ie("D",de),ie("DD",de,at),ie("Do",function(r,d){return r?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),_e(["D","DD"],Ot),_e("Do",function(r,d){d[Ot]=Te(r.match(de)[0])});var $l=yt("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),Ve("dayOfYear","DDD"),Ge("dayOfYear",4),ie("DDD",bn),ie("DDDD",Ha),_e(["DDD","DDDD"],function(r,d,h){h._dayOfYear=Te(r)});function lS(r){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return r==null?d:this.add(r-d,"d")}q("m",["mm",2],0,"minute"),Ve("minute","m"),Ge("minute",14),ie("m",de),ie("mm",de,at),_e(["m","mm"],It);var cS=yt("Minutes",!1);q("s",["ss",2],0,"second"),Ve("second","s"),Ge("second",15),ie("s",de),ie("ss",de,at),_e(["s","ss"],Ut);var dS=yt("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return this.millisecond()*10}),q(0,["SSSSS",5],0,function(){return this.millisecond()*100}),q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Ve("millisecond","ms"),Ge("millisecond",16),ie("S",bn,$a),ie("SS",bn,at),ie("SSS",bn,Ha);var nn,Hl;for(nn="SSSS";nn.length<=9;nn+="S")ie(nn,Pn);function pS(r,d){d[vn]=Te(("0."+r)*1e3)}for(nn="S";nn.length<=9;nn+="S")_e(nn,pS);Hl=yt("Milliseconds",!1),q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");function uS(){return this._isUTC?"UTC":""}function mS(){return this._isUTC?"Coordinated Universal Time":""}var J=R.prototype;J.add=rg,J.calendar=ug,J.clone=mg,J.diff=yg,J.endOf=Mg,J.format=Cg,J.from=xg,J.fromNow=Dg,J.to=Ig,J.toNow=Ng,J.get=wr,J.invalidAt=Kg,J.isAfter=fg,J.isBefore=hg,J.isBetween=gg,J.isSame=Sg,J.isSameOrAfter=bg,J.isSameOrBefore=vg,J.isValid=Pg,J.lang=Bl,J.locale=Ol,J.localeData=Al,J.max=Ph,J.min=Ah,J.parsingFlags=Fg,J.set=Er,J.startOf=kg,J.subtract=og,J.toArray=Og,J.toObject=Bg,J.toDate=Lg,J.toISOString=wg,J.inspect=Eg,typeof Symbol!="undefined"&&Symbol.for!=null&&(J[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),J.toJSON=Ag,J.toString=Tg,J.unix=Rg,J.valueOf=_g,J.creationData=Vg,J.eraName=Gg,J.eraNarrow=Ug,J.eraAbbr=Yg,J.eraYear=zg,J.year=gl,J.isLeapYear=Af,J.weekYear=eS,J.isoWeekYear=tS,J.quarter=J.quarters=iS,J.month=fl,J.daysInMonth=Lf,J.week=J.weeks=Hf,J.isoWeek=J.isoWeeks=Wf,J.weeksInYear=sS,J.weeksInWeekYear=rS,J.isoWeeksInYear=nS,J.isoWeeksInISOWeekYear=aS,J.date=$l,J.day=J.days=nh,J.weekday=ah,J.isoWeekday=sh,J.dayOfYear=lS,J.hour=J.hours=ph,J.minute=J.minutes=cS,J.second=J.seconds=dS,J.millisecond=J.milliseconds=Hl,J.utcOffset=Yh,J.utc=jh,J.local=qh,J.parseZone=Jh,J.hasAlignedHourOffset=Zh,J.isDST=Xh,J.isLocal=eg,J.isUtcOffset=tg,J.isUtc=kl,J.isUTC=kl,J.zoneAbbr=uS,J.zoneName=mS,J.dates=P("dates accessor is deprecated. Use date instead.",$l),J.months=P("months accessor is deprecated. Use month instead",fl),J.years=P("years accessor is deprecated. Use year instead",gl),J.zone=P("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zh),J.isDSTShifted=P("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Qh);function fS(r){return Le(r*1e3)}function hS(){return Le.apply(null,arguments).parseZone()}function Wl(r){return r}var ke=re.prototype;ke.calendar=Z,ke.longDateFormat=$e,ke.invalidDate=et,ke.ordinal=ct,ke.preparse=Wl,ke.postformat=Wl,ke.relativeTime=Ee,ke.pastFuture=We,ke.set=pe,ke.eras=$g,ke.erasParse=Hg,ke.erasConvertYear=Wg,ke.erasAbbrRegex=qg,ke.erasNameRegex=jg,ke.erasNarrowRegex=Jg,ke.months=kf,ke.monthsShort=Mf,ke.monthsParse=Rf,ke.monthsRegex=Bf,ke.monthsShortRegex=Of,ke.week=Ff,ke.firstDayOfYear=$f,ke.firstDayOfWeek=Vf,ke.weekdays=Zf,ke.weekdaysMin=Qf,ke.weekdaysShort=Xf,ke.weekdaysParse=th,ke.weekdaysRegex=rh,ke.weekdaysShortRegex=oh,ke.weekdaysMinRegex=ih,ke.isPM=ch,ke.meridiem=uh;function as(r,d,h,b){var C=zt(),L=w().set(b,d);return C[h](L,r)}function Gl(r,d,h){if(f(r)&&(d=r,r=void 0),r=r||"",d!=null)return as(r,d,h,"month");var b,C=[];for(b=0;b<12;b++)C[b]=as(r,b,h,"month");return C}function Kr(r,d,h,b){typeof r=="boolean"?(f(d)&&(h=d,d=void 0),d=d||""):(d=r,h=d,r=!1,f(d)&&(h=d,d=void 0),d=d||"");var C=zt(),L=r?C._week.dow:0,G,ge=[];if(h!=null)return as(d,(h+L)%7,b,"day");for(G=0;G<7;G++)ge[G]=as(d,(G+L)%7,b,"day");return ge}function gS(r,d){return Gl(r,d,"months")}function SS(r,d){return Gl(r,d,"monthsShort")}function bS(r,d,h){return Kr(r,d,h,"weekdays")}function vS(r,d,h){return Kr(r,d,h,"weekdaysShort")}function yS(r,d,h){return Kr(r,d,h,"weekdaysMin")}tn("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(r){var d=r%10,h=Te(r%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return r+h}}),s.lang=P("moment.lang is deprecated. Use moment.locale instead.",tn),s.langData=P("moment.langData is deprecated. Use moment.localeData instead.",zt);var jt=Math.abs;function TS(){var r=this._data;return this._milliseconds=jt(this._milliseconds),this._days=jt(this._days),this._months=jt(this._months),r.milliseconds=jt(r.milliseconds),r.seconds=jt(r.seconds),r.minutes=jt(r.minutes),r.hours=jt(r.hours),r.months=jt(r.months),r.years=jt(r.years),this}function Ul(r,d,h,b){var C=Nt(d,h);return r._milliseconds+=b*C._milliseconds,r._days+=b*C._days,r._months+=b*C._months,r._bubble()}function wS(r,d){return Ul(this,r,d,1)}function ES(r,d){return Ul(this,r,d,-1)}function Yl(r){return r<0?Math.floor(r):Math.ceil(r)}function CS(){var r=this._milliseconds,d=this._days,h=this._months,b=this._data,C,L,G,ge,xe;return r>=0&&d>=0&&h>=0||r<=0&&d<=0&&h<=0||(r+=Yl(Vr(h)+d)*864e5,d=0,h=0),b.milliseconds=r%1e3,C=tt(r/1e3),b.seconds=C%60,L=tt(C/60),b.minutes=L%60,G=tt(L/60),b.hours=G%24,d+=tt(G/24),xe=tt(zl(d)),h+=xe,d-=Yl(Vr(xe)),ge=tt(h/12),h%=12,b.days=d,b.months=h,b.years=ge,this}function zl(r){return r*4800/146097}function Vr(r){return r*146097/4800}function xS(r){if(!this.isValid())return NaN;var d,h,b=this._milliseconds;if(r=Se(r),r==="month"||r==="quarter"||r==="year")switch(d=this._days+b/864e5,h=this._months+zl(d),r){case"month":return h;case"quarter":return h/3;case"year":return h/12}else switch(d=this._days+Math.round(Vr(this._months)),r){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 "+r)}}function DS(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Te(this._months/12)*31536e6:NaN}function qt(r){return function(){return this.as(r)}}var IS=qt("ms"),NS=qt("s"),kS=qt("m"),MS=qt("h"),_S=qt("d"),RS=qt("w"),LS=qt("M"),OS=qt("Q"),BS=qt("y");function AS(){return Nt(this)}function PS(r){return r=Se(r),this.isValid()?this[r+"s"]():NaN}function Tn(r){return function(){return this.isValid()?this._data[r]:NaN}}var FS=Tn("milliseconds"),KS=Tn("seconds"),VS=Tn("minutes"),$S=Tn("hours"),HS=Tn("days"),WS=Tn("months"),GS=Tn("years");function US(){return tt(this.days()/7)}var Jt=Math.round,$n={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function YS(r,d,h,b,C){return C.relativeTime(d||1,!!h,r,b)}function zS(r,d,h,b){var C=Nt(r).abs(),L=Jt(C.as("s")),G=Jt(C.as("m")),ge=Jt(C.as("h")),xe=Jt(C.as("d")),Re=Jt(C.as("M")),Bt=Jt(C.as("w")),Zt=Jt(C.as("y")),an=L<=h.ss&&["s",L]||L<h.s&&["ss",L]||G<=1&&["m"]||G<h.m&&["mm",G]||ge<=1&&["h"]||ge<h.h&&["hh",ge]||xe<=1&&["d"]||xe<h.d&&["dd",xe];return h.w!=null&&(an=an||Bt<=1&&["w"]||Bt<h.w&&["ww",Bt]),an=an||Re<=1&&["M"]||Re<h.M&&["MM",Re]||Zt<=1&&["y"]||["yy",Zt],an[2]=d,an[3]=+r>0,an[4]=b,YS.apply(null,an)}function jS(r){return r===void 0?Jt:typeof r=="function"?(Jt=r,!0):!1}function qS(r,d){return $n[r]===void 0?!1:d===void 0?$n[r]:($n[r]=d,r==="s"&&($n.ss=d-1),!0)}function JS(r,d){if(!this.isValid())return this.localeData().invalidDate();var h=!1,b=$n,C,L;return typeof r=="object"&&(d=r,r=!1),typeof r=="boolean"&&(h=r),typeof d=="object"&&(b=Object.assign({},$n,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),C=this.localeData(),L=zS(this,!h,b,C),h&&(L=C.pastFuture(+this,L)),C.postformat(L)}var $r=Math.abs;function Hn(r){return(r>0)-(r<0)||+r}function ss(){if(!this.isValid())return this.localeData().invalidDate();var r=$r(this._milliseconds)/1e3,d=$r(this._days),h=$r(this._months),b,C,L,G,ge=this.asSeconds(),xe,Re,Bt,Zt;return ge?(b=tt(r/60),C=tt(b/60),r%=60,b%=60,L=tt(h/12),h%=12,G=r?r.toFixed(3).replace(/\.?0+$/,""):"",xe=ge<0?"-":"",Re=Hn(this._months)!==Hn(ge)?"-":"",Bt=Hn(this._days)!==Hn(ge)?"-":"",Zt=Hn(this._milliseconds)!==Hn(ge)?"-":"",xe+"P"+(L?Re+L+"Y":"")+(h?Re+h+"M":"")+(d?Bt+d+"D":"")+(C||b||r?"T":"")+(C?Zt+C+"H":"")+(b?Zt+b+"M":"")+(r?Zt+G+"S":"")):"P0D"}var De=Za.prototype;De.isValid=Hh,De.abs=TS,De.add=wS,De.subtract=ES,De.as=xS,De.asMilliseconds=IS,De.asSeconds=NS,De.asMinutes=kS,De.asHours=MS,De.asDays=_S,De.asWeeks=RS,De.asMonths=LS,De.asQuarters=OS,De.asYears=BS,De.valueOf=DS,De._bubble=CS,De.clone=AS,De.get=PS,De.milliseconds=FS,De.seconds=KS,De.minutes=VS,De.hours=$S,De.days=HS,De.weeks=US,De.months=WS,De.years=GS,De.humanize=JS,De.toISOString=ss,De.toString=ss,De.toJSON=ss,De.locale=Ol,De.localeData=Al,De.toIsoString=P("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ss),De.lang=Bl,q("X",0,0,"unix"),q("x",0,0,"valueOf"),ie("x",Ga),ie("X",vf),_e("X",function(r,d,h){h._d=new Date(parseFloat(r)*1e3)}),_e("x",function(r,d,h){h._d=new Date(Te(r))});//! moment.js
|
|
1684
|
-
return s.version="2.29.1",o(Le),s.fn=J,s.min=Fh,s.max=Kh,s.now=Vh,s.utc=w,s.unix=fS,s.months=gS,s.isDate=m,s.locale=tn,s.invalid=v,s.duration=Nt,s.isMoment=
|
|
1683
|
+
`+new Error().stack),h=!1}return d.apply(this,arguments)},d)}var $={};function V(r,d){s.deprecationHandler!=null&&s.deprecationHandler(r,d),$[r]||(F(d),$[r]=!0)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null;function W(r){return typeof Function!="undefined"&&r instanceof Function||Object.prototype.toString.call(r)==="[object Function]"}function pe(r){var d,h;for(h in r)l(r,h)&&(d=r[h],W(d)?this[h]=d:this["_"+h]=d);this._config=r,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function me(r,d){var h=S({},r),b;for(b in d)l(d,b)&&(c(r[b])&&c(d[b])?(h[b]={},S(h[b],r[b]),S(h[b],d[b])):d[b]!=null?h[b]=d[b]:delete h[b]);for(b in r)l(r,b)&&!l(d,b)&&c(r[b])&&(h[b]=S({},h[b]));return h}function re(r){r!=null&&this.set(r)}var se;Object.keys?se=Object.keys:se=function(r){var d,h=[];for(d in r)l(r,d)&&h.push(d);return h};var j={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Z(r,d,h){var b=this._calendar[r]||this._calendar.sameElse;return W(b)?b.call(d,h):b}function oe(r,d,h){var b=""+Math.abs(r),E=d-b.length,O=r>=0;return(O?h?"+":"":"-")+Math.pow(10,Math.max(0,E)).toString().substr(1)+b}var ee=/(\[[^\[]*\])|(\\)?([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,te=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,X={},le={};function q(r,d,h,b){var E=b;typeof b=="string"&&(E=function(){return this[b]()}),r&&(le[r]=E),d&&(le[d[0]]=function(){return oe(E.apply(this,arguments),d[1],d[2])}),h&&(le[h]=function(){return this.localeData().ordinal(E.apply(this,arguments),r)})}function ye(r){return r.match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"")}function Ie(r){var d=r.match(ee),h,b;for(h=0,b=d.length;h<b;h++)le[d[h]]?d[h]=le[d[h]]:d[h]=ye(d[h]);return function(E){var O="",U;for(U=0;U<b;U++)O+=W(d[U])?d[U].call(E,r):d[U];return O}}function Ce(r,d){return r.isValid()?(d=we(d,r.localeData()),X[d]=X[d]||Ie(d),X[d](r)):r.localeData().invalidDate()}function we(r,d){var h=5;function b(E){return d.longDateFormat(E)||E}for(te.lastIndex=0;h>=0&&te.test(r);)r=r.replace(te,b),te.lastIndex=0,h-=1;return r}var Ke={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 $e(r){var d=this._longDateFormat[r],h=this._longDateFormat[r.toUpperCase()];return d||!h?d:(this._longDateFormat[r]=h.match(ee).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[r])}var je="Invalid date";function et(){return this._invalidDate}var qe="%d",ut=/\d{1,2}/;function ct(r){return this._ordinal.replace("%d",r)}var vt={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 Ee(r,d,h,b){var E=this._relativeTime[h];return W(E)?E(r,d,h,b):E.replace(/%d/i,r)}function We(r,d){var h=this._relativeTime[r>0?"future":"past"];return W(h)?h(d):h.replace(/%s/i,d)}var Ye={};function Ve(r,d){var h=r.toLowerCase();Ye[h]=Ye[h+"s"]=Ye[d]=r}function Se(r){return typeof r=="string"?Ye[r]||Ye[r.toLowerCase()]:void 0}function He(r){var d={},h,b;for(b in r)l(r,b)&&(h=Se(b),h&&(d[h]=r[b]));return d}var Ae={};function Ge(r,d){Ae[r]=d}function Tr(r){var d=[],h;for(h in r)l(r,h)&&d.push({unit:h,priority:Ae[h]});return d.sort(function(b,E){return b.priority-E.priority}),d}function On(r){return r%4==0&&r%100!=0||r%400==0}function tt(r){return r<0?Math.ceil(r)||0:Math.floor(r)}function Te(r){var d=+r,h=0;return d!==0&&isFinite(d)&&(h=tt(d)),h}function yt(r,d){return function(h){return h!=null?(Bn(this,r,h),s.updateOffset(this,d),this):gn(this,r)}}function gn(r,d){return r.isValid()?r._d["get"+(r._isUTC?"UTC":"")+d]():NaN}function Bn(r,d,h){r.isValid()&&!isNaN(h)&&(d==="FullYear"&&On(r.year())&&r.month()===1&&r.date()===29?(h=Te(h),r._d["set"+(r._isUTC?"UTC":"")+d](h,r.month(),za(h,r.month()))):r._d["set"+(r._isUTC?"UTC":"")+d](h))}function wr(r){return r=Se(r),W(this[r])?this[r]():this}function Er(r,d){if(typeof r=="object"){r=He(r);var h=Tr(r),b;for(b=0;b<h.length;b++)this[h[b].unit](r[h[b].unit])}else if(r=Se(r),W(this[r]))return this[r](d);return this}var $a=/\d/,at=/\d\d/,Ha=/\d{3}/,An=/\d{4}/,ve=/[+-]?\d{6}/,de=/\d\d?/,ot=/\d\d\d\d?/,Sn=/\d\d\d\d\d\d?/,bn=/\d{1,3}/,ia=/\d{1,4}/,Wa=/[+-]?\d{1,6}/,Pn=/\d+/,Ga=/[+-]?\d+/,bf=/Z|[+-]\d\d:?\d\d/gi,Ua=/Z|[+-]\d\d(?::?\d\d)?/gi,vf=/[+-]?\d+(\.\d{1,3})?/,la=/[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,Ya;Ya={};function ie(r,d,h){Ya[r]=W(d)?d:function(b,E){return b&&h?h:d}}function yf(r,d){return l(Ya,r)?Ya[r](d._strict,d._locale):new RegExp(Tf(r))}function Tf(r){return mt(r.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,h,b,E,O){return h||b||E||O}))}function mt(r){return r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Cr={};function _e(r,d){var h,b=d;for(typeof r=="string"&&(r=[r]),f(d)&&(b=function(E,O){O[d]=Te(E)}),h=0;h<r.length;h++)Cr[r[h]]=b}function ca(r,d){_e(r,function(h,b,E,O){E._w=E._w||{},d(h,E._w,E,O)})}function wf(r,d,h){d!=null&&l(Cr,r)&&Cr[r](d,h._a,h,r)}var st=0,Gt=1,Ot=2,ze=3,It=4,Ut=5,vn=6,Ef=7,Cf=8;function xf(r,d){return(r%d+d)%d}var Ue;Array.prototype.indexOf?Ue=Array.prototype.indexOf:Ue=function(r){var d;for(d=0;d<this.length;++d)if(this[d]===r)return d;return-1};function za(r,d){if(isNaN(r)||isNaN(d))return NaN;var h=xf(d,12);return r+=(d-h)/12,h===1?On(r)?29:28:31-h%7%2}q("M",["MM",2],"Mo",function(){return this.month()+1}),q("MMM",0,0,function(r){return this.localeData().monthsShort(this,r)}),q("MMMM",0,0,function(r){return this.localeData().months(this,r)}),Ve("month","M"),Ge("month",8),ie("M",de),ie("MM",de,at),ie("MMM",function(r,d){return d.monthsShortRegex(r)}),ie("MMMM",function(r,d){return d.monthsRegex(r)}),_e(["M","MM"],function(r,d){d[Gt]=Te(r)-1}),_e(["MMM","MMMM"],function(r,d,h,b){var E=h._locale.monthsParse(r,b,h._strict);E!=null?d[Gt]=E:C(h).invalidMonth=r});var Df="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),pl="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ul=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,If=la,Nf=la;function kf(r,d){return r?i(this._months)?this._months[r.month()]:this._months[(this._months.isFormat||ul).test(d)?"format":"standalone"][r.month()]:i(this._months)?this._months:this._months.standalone}function Mf(r,d){return r?i(this._monthsShort)?this._monthsShort[r.month()]:this._monthsShort[ul.test(d)?"format":"standalone"][r.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _f(r,d,h){var b,E,O,U=r.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)O=w([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(O,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(O,"").toLocaleLowerCase();return h?d==="MMM"?(E=Ue.call(this._shortMonthsParse,U),E!==-1?E:null):(E=Ue.call(this._longMonthsParse,U),E!==-1?E:null):d==="MMM"?(E=Ue.call(this._shortMonthsParse,U),E!==-1?E:(E=Ue.call(this._longMonthsParse,U),E!==-1?E:null)):(E=Ue.call(this._longMonthsParse,U),E!==-1?E:(E=Ue.call(this._shortMonthsParse,U),E!==-1?E:null))}function Rf(r,d,h){var b,E,O;if(this._monthsParseExact)return _f.call(this,r,d,h);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(E=w([2e3,b]),h&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(E,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(E,"").replace(".","")+"$","i")),!h&&!this._monthsParse[b]&&(O="^"+this.months(E,"")+"|^"+this.monthsShort(E,""),this._monthsParse[b]=new RegExp(O.replace(".",""),"i")),h&&d==="MMMM"&&this._longMonthsParse[b].test(r))return b;if(h&&d==="MMM"&&this._shortMonthsParse[b].test(r))return b;if(!h&&this._monthsParse[b].test(r))return b}}function ml(r,d){var h;if(!r.isValid())return r;if(typeof d=="string"){if(/^\d+$/.test(d))d=Te(d);else if(d=r.localeData().monthsParse(d),!f(d))return r}return h=Math.min(r.date(),za(r.year(),d)),r._d["set"+(r._isUTC?"UTC":"")+"Month"](d,h),r}function fl(r){return r!=null?(ml(this,r),s.updateOffset(this,!0),this):gn(this,"Month")}function Lf(){return za(this.year(),this.month())}function Of(r){return this._monthsParseExact?(l(this,"_monthsRegex")||hl.call(this),r?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=If),this._monthsShortStrictRegex&&r?this._monthsShortStrictRegex:this._monthsShortRegex)}function Bf(r){return this._monthsParseExact?(l(this,"_monthsRegex")||hl.call(this),r?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Nf),this._monthsStrictRegex&&r?this._monthsStrictRegex:this._monthsRegex)}function hl(){function r(U,ge){return ge.length-U.length}var d=[],h=[],b=[],E,O;for(E=0;E<12;E++)O=w([2e3,E]),d.push(this.monthsShort(O,"")),h.push(this.months(O,"")),b.push(this.months(O,"")),b.push(this.monthsShort(O,""));for(d.sort(r),h.sort(r),b.sort(r),E=0;E<12;E++)d[E]=mt(d[E]),h[E]=mt(h[E]);for(E=0;E<24;E++)b[E]=mt(b[E]);this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}q("Y",0,0,function(){var r=this.year();return r<=9999?oe(r,4):"+"+r}),q(0,["YY",2],0,function(){return this.year()%100}),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),Ve("year","y"),Ge("year",1),ie("Y",Ga),ie("YY",de,at),ie("YYYY",ia,An),ie("YYYYY",Wa,ve),ie("YYYYYY",Wa,ve),_e(["YYYYY","YYYYYY"],st),_e("YYYY",function(r,d){d[st]=r.length===2?s.parseTwoDigitYear(r):Te(r)}),_e("YY",function(r,d){d[st]=s.parseTwoDigitYear(r)}),_e("Y",function(r,d){d[st]=parseInt(r,10)});function da(r){return On(r)?366:365}s.parseTwoDigitYear=function(r){return Te(r)+(Te(r)>68?1900:2e3)};var gl=yt("FullYear",!0);function Af(){return On(this.year())}function Pf(r,d,h,b,E,O,U){var ge;return r<100&&r>=0?(ge=new Date(r+400,d,h,b,E,O,U),isFinite(ge.getFullYear())&&ge.setFullYear(r)):ge=new Date(r,d,h,b,E,O,U),ge}function pa(r){var d,h;return r<100&&r>=0?(h=Array.prototype.slice.call(arguments),h[0]=r+400,d=new Date(Date.UTC.apply(null,h)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(r)):d=new Date(Date.UTC.apply(null,arguments)),d}function ja(r,d,h){var b=7+d-h,E=(7+pa(r,0,b).getUTCDay()-d)%7;return-E+b-1}function Sl(r,d,h,b,E){var O=(7+h-b)%7,U=ja(r,b,E),ge=1+7*(d-1)+O+U,xe,Re;return ge<=0?(xe=r-1,Re=da(xe)+ge):ge>da(r)?(xe=r+1,Re=ge-da(r)):(xe=r,Re=ge),{year:xe,dayOfYear:Re}}function ua(r,d,h){var b=ja(r.year(),d,h),E=Math.floor((r.dayOfYear()-b-1)/7)+1,O,U;return E<1?(U=r.year()-1,O=E+Yt(U,d,h)):E>Yt(r.year(),d,h)?(O=E-Yt(r.year(),d,h),U=r.year()+1):(U=r.year(),O=E),{week:O,year:U}}function Yt(r,d,h){var b=ja(r,d,h),E=ja(r+1,d,h);return(da(r)-b+E)/7}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),Ve("week","w"),Ve("isoWeek","W"),Ge("week",5),Ge("isoWeek",5),ie("w",de),ie("ww",de,at),ie("W",de),ie("WW",de,at),ca(["w","ww","W","WW"],function(r,d,h,b){d[b.substr(0,1)]=Te(r)});function Ff(r){return ua(r,this._week.dow,this._week.doy).week}var Kf={dow:0,doy:6};function Vf(){return this._week.dow}function $f(){return this._week.doy}function Hf(r){var d=this.localeData().week(this);return r==null?d:this.add((r-d)*7,"d")}function Wf(r){var d=ua(this,1,4).week;return r==null?d:this.add((r-d)*7,"d")}q("d",0,"do","day"),q("dd",0,0,function(r){return this.localeData().weekdaysMin(this,r)}),q("ddd",0,0,function(r){return this.localeData().weekdaysShort(this,r)}),q("dddd",0,0,function(r){return this.localeData().weekdays(this,r)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),Ve("day","d"),Ve("weekday","e"),Ve("isoWeekday","E"),Ge("day",11),Ge("weekday",11),Ge("isoWeekday",11),ie("d",de),ie("e",de),ie("E",de),ie("dd",function(r,d){return d.weekdaysMinRegex(r)}),ie("ddd",function(r,d){return d.weekdaysShortRegex(r)}),ie("dddd",function(r,d){return d.weekdaysRegex(r)}),ca(["dd","ddd","dddd"],function(r,d,h,b){var E=h._locale.weekdaysParse(r,b,h._strict);E!=null?d.d=E:C(h).invalidWeekday=r}),ca(["d","e","E"],function(r,d,h,b){d[b]=Te(r)});function Gf(r,d){return typeof r!="string"?r:isNaN(r)?(r=d.weekdaysParse(r),typeof r=="number"?r:null):parseInt(r,10)}function Uf(r,d){return typeof r=="string"?d.weekdaysParse(r)%7||7:isNaN(r)?null:r}function xr(r,d){return r.slice(d,7).concat(r.slice(0,d))}var Yf="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zf="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jf=la,qf=la,Jf=la;function Zf(r,d){var h=i(this._weekdays)?this._weekdays:this._weekdays[r&&r!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return r===!0?xr(h,this._week.dow):r?h[r.day()]:h}function Xf(r){return r===!0?xr(this._weekdaysShort,this._week.dow):r?this._weekdaysShort[r.day()]:this._weekdaysShort}function Qf(r){return r===!0?xr(this._weekdaysMin,this._week.dow):r?this._weekdaysMin[r.day()]:this._weekdaysMin}function eh(r,d,h){var b,E,O,U=r.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)O=w([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(O,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(O,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(O,"").toLocaleLowerCase();return h?d==="dddd"?(E=Ue.call(this._weekdaysParse,U),E!==-1?E:null):d==="ddd"?(E=Ue.call(this._shortWeekdaysParse,U),E!==-1?E:null):(E=Ue.call(this._minWeekdaysParse,U),E!==-1?E:null):d==="dddd"?(E=Ue.call(this._weekdaysParse,U),E!==-1||(E=Ue.call(this._shortWeekdaysParse,U),E!==-1)?E:(E=Ue.call(this._minWeekdaysParse,U),E!==-1?E:null)):d==="ddd"?(E=Ue.call(this._shortWeekdaysParse,U),E!==-1||(E=Ue.call(this._weekdaysParse,U),E!==-1)?E:(E=Ue.call(this._minWeekdaysParse,U),E!==-1?E:null)):(E=Ue.call(this._minWeekdaysParse,U),E!==-1||(E=Ue.call(this._weekdaysParse,U),E!==-1)?E:(E=Ue.call(this._shortWeekdaysParse,U),E!==-1?E:null))}function th(r,d,h){var b,E,O;if(this._weekdaysParseExact)return eh.call(this,r,d,h);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(E=w([2e3,1]).day(b),h&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(E,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(E,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(E,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(O="^"+this.weekdays(E,"")+"|^"+this.weekdaysShort(E,"")+"|^"+this.weekdaysMin(E,""),this._weekdaysParse[b]=new RegExp(O.replace(".",""),"i")),h&&d==="dddd"&&this._fullWeekdaysParse[b].test(r))return b;if(h&&d==="ddd"&&this._shortWeekdaysParse[b].test(r))return b;if(h&&d==="dd"&&this._minWeekdaysParse[b].test(r))return b;if(!h&&this._weekdaysParse[b].test(r))return b}}function nh(r){if(!this.isValid())return r!=null?this:NaN;var d=this._isUTC?this._d.getUTCDay():this._d.getDay();return r!=null?(r=Gf(r,this.localeData()),this.add(r-d,"d")):d}function ah(r){if(!this.isValid())return r!=null?this:NaN;var d=(this.day()+7-this.localeData()._week.dow)%7;return r==null?d:this.add(r-d,"d")}function sh(r){if(!this.isValid())return r!=null?this:NaN;if(r!=null){var d=Uf(r,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function rh(r){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Dr.call(this),r?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=jf),this._weekdaysStrictRegex&&r?this._weekdaysStrictRegex:this._weekdaysRegex)}function oh(r){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Dr.call(this),r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qf),this._weekdaysShortStrictRegex&&r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ih(r){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Dr.call(this),r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Jf),this._weekdaysMinStrictRegex&&r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Dr(){function r(Bt,Zt){return Zt.length-Bt.length}var d=[],h=[],b=[],E=[],O,U,ge,xe,Re;for(O=0;O<7;O++)U=w([2e3,1]).day(O),ge=mt(this.weekdaysMin(U,"")),xe=mt(this.weekdaysShort(U,"")),Re=mt(this.weekdays(U,"")),d.push(ge),h.push(xe),b.push(Re),E.push(ge),E.push(xe),E.push(Re);d.sort(r),h.sort(r),b.sort(r),E.sort(r),this._weekdaysRegex=new RegExp("^("+E.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Ir(){return this.hours()%12||12}function lh(){return this.hours()||24}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Ir),q("k",["kk",2],0,lh),q("hmm",0,0,function(){return""+Ir.apply(this)+oe(this.minutes(),2)}),q("hmmss",0,0,function(){return""+Ir.apply(this)+oe(this.minutes(),2)+oe(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+oe(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+oe(this.minutes(),2)+oe(this.seconds(),2)});function vl(r,d){q(r,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}vl("a",!0),vl("A",!1),Ve("hour","h"),Ge("hour",13);function yl(r,d){return d._meridiemParse}ie("a",yl),ie("A",yl),ie("H",de),ie("h",de),ie("k",de),ie("HH",de,at),ie("hh",de,at),ie("kk",de,at),ie("hmm",ot),ie("hmmss",Sn),ie("Hmm",ot),ie("Hmmss",Sn),_e(["H","HH"],ze),_e(["k","kk"],function(r,d,h){var b=Te(r);d[ze]=b===24?0:b}),_e(["a","A"],function(r,d,h){h._isPm=h._locale.isPM(r),h._meridiem=r}),_e(["h","hh"],function(r,d,h){d[ze]=Te(r),C(h).bigHour=!0}),_e("hmm",function(r,d,h){var b=r.length-2;d[ze]=Te(r.substr(0,b)),d[It]=Te(r.substr(b)),C(h).bigHour=!0}),_e("hmmss",function(r,d,h){var b=r.length-4,E=r.length-2;d[ze]=Te(r.substr(0,b)),d[It]=Te(r.substr(b,2)),d[Ut]=Te(r.substr(E)),C(h).bigHour=!0}),_e("Hmm",function(r,d,h){var b=r.length-2;d[ze]=Te(r.substr(0,b)),d[It]=Te(r.substr(b))}),_e("Hmmss",function(r,d,h){var b=r.length-4,E=r.length-2;d[ze]=Te(r.substr(0,b)),d[It]=Te(r.substr(b,2)),d[Ut]=Te(r.substr(E))});function ch(r){return(r+"").toLowerCase().charAt(0)==="p"}var dh=/[ap]\.?m?\.?/i,ph=yt("Hours",!0);function uh(r,d,h){return r>11?h?"pm":"PM":h?"am":"AM"}var Tl={calendar:j,longDateFormat:Ke,invalidDate:je,ordinal:qe,dayOfMonthOrdinalParse:ut,relativeTime:vt,months:Df,monthsShort:pl,week:Kf,weekdays:Yf,weekdaysMin:zf,weekdaysShort:bl,meridiemParse:dh},Pe={},ma={},fa;function mh(r,d){var h,b=Math.min(r.length,d.length);for(h=0;h<b;h+=1)if(r[h]!==d[h])return h;return b}function wl(r){return r&&r.toLowerCase().replace("_","-")}function fh(r){for(var d=0,h,b,E,O;d<r.length;){for(O=wl(r[d]).split("-"),h=O.length,b=wl(r[d+1]),b=b?b.split("-"):null;h>0;){if(E=qa(O.slice(0,h).join("-")),E)return E;if(b&&b.length>=h&&mh(O,b)>=h-1)break;h--}d++}return fa}function qa(r){var d=null,h;if(Pe[r]===void 0&&!0&&e&&e.exports)try{d=fa._abbr,h=Pt,h("./locale/"+r),tn(d)}catch{Pe[r]=null}return Pe[r]}function tn(r,d){var h;return r&&(u(d)?h=zt(r):h=Nr(r,d),h?fa=h:typeof console!="undefined"&&console.warn&&console.warn("Locale "+r+" not found. Did you forget to load it?")),fa._abbr}function Nr(r,d){if(d!==null){var h,b=Tl;if(d.abbr=r,Pe[r]!=null)V("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=Pe[r]._config;else if(d.parentLocale!=null)if(Pe[d.parentLocale]!=null)b=Pe[d.parentLocale]._config;else if(h=qa(d.parentLocale),h!=null)b=h._config;else return ma[d.parentLocale]||(ma[d.parentLocale]=[]),ma[d.parentLocale].push({name:r,config:d}),null;return Pe[r]=new re(me(b,d)),ma[r]&&ma[r].forEach(function(E){Nr(E.name,E.config)}),tn(r),Pe[r]}else return delete Pe[r],null}function hh(r,d){if(d!=null){var h,b,E=Tl;Pe[r]!=null&&Pe[r].parentLocale!=null?Pe[r].set(me(Pe[r]._config,d)):(b=qa(r),b!=null&&(E=b._config),d=me(E,d),b==null&&(d.abbr=r),h=new re(d),h.parentLocale=Pe[r],Pe[r]=h),tn(r)}else Pe[r]!=null&&(Pe[r].parentLocale!=null?(Pe[r]=Pe[r].parentLocale,r===tn()&&tn(r)):Pe[r]!=null&&delete Pe[r]);return Pe[r]}function zt(r){var d;if(r&&r._locale&&r._locale._abbr&&(r=r._locale._abbr),!r)return fa;if(!i(r)){if(d=qa(r),d)return d;r=[r]}return fh(r)}function gh(){return se(Pe)}function kr(r){var d,h=r._a;return h&&C(r).overflow===-2&&(d=h[Gt]<0||h[Gt]>11?Gt:h[Ot]<1||h[Ot]>za(h[st],h[Gt])?Ot:h[ze]<0||h[ze]>24||h[ze]===24&&(h[It]!==0||h[Ut]!==0||h[vn]!==0)?ze:h[It]<0||h[It]>59?It:h[Ut]<0||h[Ut]>59?Ut:h[vn]<0||h[vn]>999?vn:-1,C(r)._overflowDayOfYear&&(d<st||d>Ot)&&(d=Ot),C(r)._overflowWeeks&&d===-1&&(d=Ef),C(r)._overflowWeekday&&d===-1&&(d=Cf),C(r).overflow=d),r}var Sh=/^\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)?)?$/,bh=/^\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)?)?$/,vh=/Z|[+-]\d\d(?::?\d\d)?/,Ja=[["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]],Mr=[["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/]],yh=/^\/?Date\((-?\d+)/i,Th=/^(?:(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}))$/,wh={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 El(r){var d,h,b=r._i,E=Sh.exec(b)||bh.exec(b),O,U,ge,xe;if(E){for(C(r).iso=!0,d=0,h=Ja.length;d<h;d++)if(Ja[d][1].exec(E[1])){U=Ja[d][0],O=Ja[d][2]!==!1;break}if(U==null){r._isValid=!1;return}if(E[3]){for(d=0,h=Mr.length;d<h;d++)if(Mr[d][1].exec(E[3])){ge=(E[2]||" ")+Mr[d][0];break}if(ge==null){r._isValid=!1;return}}if(!O&&ge!=null){r._isValid=!1;return}if(E[4])if(vh.exec(E[4]))xe="Z";else{r._isValid=!1;return}r._f=U+(ge||"")+(xe||""),Rr(r)}else r._isValid=!1}function Eh(r,d,h,b,E,O){var U=[Ch(r),pl.indexOf(d),parseInt(h,10),parseInt(b,10),parseInt(E,10)];return O&&U.push(parseInt(O,10)),U}function Ch(r){var d=parseInt(r,10);return d<=49?2e3+d:d<=999?1900+d:d}function xh(r){return r.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dh(r,d,h){if(r){var b=bl.indexOf(r),E=new Date(d[0],d[1],d[2]).getDay();if(b!==E)return C(h).weekdayMismatch=!0,h._isValid=!1,!1}return!0}function Ih(r,d,h){if(r)return wh[r];if(d)return 0;var b=parseInt(h,10),E=b%100,O=(b-E)/100;return O*60+E}function Cl(r){var d=Th.exec(xh(r._i)),h;if(d){if(h=Eh(d[4],d[3],d[2],d[5],d[6],d[7]),!Dh(d[1],h,r))return;r._a=h,r._tzm=Ih(d[8],d[9],d[10]),r._d=pa.apply(null,r._a),r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),C(r).rfc2822=!0}else r._isValid=!1}function Nh(r){var d=yh.exec(r._i);if(d!==null){r._d=new Date(+d[1]);return}if(El(r),r._isValid===!1)delete r._isValid;else return;if(Cl(r),r._isValid===!1)delete r._isValid;else return;r._strict?r._isValid=!1:s.createFromInputFallback(r)}s.createFromInputFallback=A("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(r){r._d=new Date(r._i+(r._useUTC?" UTC":""))});function Fn(r,d,h){return r!=null?r:d!=null?d:h}function kh(r){var d=new Date(s.now());return r._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function _r(r){var d,h,b=[],E,O,U;if(!r._d){for(E=kh(r),r._w&&r._a[Ot]==null&&r._a[Gt]==null&&Mh(r),r._dayOfYear!=null&&(U=Fn(r._a[st],E[st]),(r._dayOfYear>da(U)||r._dayOfYear===0)&&(C(r)._overflowDayOfYear=!0),h=pa(U,0,r._dayOfYear),r._a[Gt]=h.getUTCMonth(),r._a[Ot]=h.getUTCDate()),d=0;d<3&&r._a[d]==null;++d)r._a[d]=b[d]=E[d];for(;d<7;d++)r._a[d]=b[d]=r._a[d]==null?d===2?1:0:r._a[d];r._a[ze]===24&&r._a[It]===0&&r._a[Ut]===0&&r._a[vn]===0&&(r._nextDay=!0,r._a[ze]=0),r._d=(r._useUTC?pa:Pf).apply(null,b),O=r._useUTC?r._d.getUTCDay():r._d.getDay(),r._tzm!=null&&r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),r._nextDay&&(r._a[ze]=24),r._w&&typeof r._w.d!="undefined"&&r._w.d!==O&&(C(r).weekdayMismatch=!0)}}function Mh(r){var d,h,b,E,O,U,ge,xe,Re;d=r._w,d.GG!=null||d.W!=null||d.E!=null?(O=1,U=4,h=Fn(d.GG,r._a[st],ua(Le(),1,4).year),b=Fn(d.W,1),E=Fn(d.E,1),(E<1||E>7)&&(xe=!0)):(O=r._locale._week.dow,U=r._locale._week.doy,Re=ua(Le(),O,U),h=Fn(d.gg,r._a[st],Re.year),b=Fn(d.w,Re.week),d.d!=null?(E=d.d,(E<0||E>6)&&(xe=!0)):d.e!=null?(E=d.e+O,(d.e<0||d.e>6)&&(xe=!0)):E=O),b<1||b>Yt(h,O,U)?C(r)._overflowWeeks=!0:xe!=null?C(r)._overflowWeekday=!0:(ge=Sl(h,b,E,O,U),r._a[st]=ge.year,r._dayOfYear=ge.dayOfYear)}s.ISO_8601=function(){},s.RFC_2822=function(){};function Rr(r){if(r._f===s.ISO_8601){El(r);return}if(r._f===s.RFC_2822){Cl(r);return}r._a=[],C(r).empty=!0;var d=""+r._i,h,b,E,O,U,ge=d.length,xe=0,Re;for(E=we(r._f,r._locale).match(ee)||[],h=0;h<E.length;h++)O=E[h],b=(d.match(yf(O,r))||[])[0],b&&(U=d.substr(0,d.indexOf(b)),U.length>0&&C(r).unusedInput.push(U),d=d.slice(d.indexOf(b)+b.length),xe+=b.length),le[O]?(b?C(r).empty=!1:C(r).unusedTokens.push(O),wf(O,b,r)):r._strict&&!b&&C(r).unusedTokens.push(O);C(r).charsLeftOver=ge-xe,d.length>0&&C(r).unusedInput.push(d),r._a[ze]<=12&&C(r).bigHour===!0&&r._a[ze]>0&&(C(r).bigHour=void 0),C(r).parsedDateParts=r._a.slice(0),C(r).meridiem=r._meridiem,r._a[ze]=_h(r._locale,r._a[ze],r._meridiem),Re=C(r).era,Re!==null&&(r._a[st]=r._locale.erasConvertYear(Re,r._a[st])),_r(r),kr(r)}function _h(r,d,h){var b;return h==null?d:r.meridiemHour!=null?r.meridiemHour(d,h):(r.isPM!=null&&(b=r.isPM(h),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function Rh(r){var d,h,b,E,O,U,ge=!1;if(r._f.length===0){C(r).invalidFormat=!0,r._d=new Date(NaN);return}for(E=0;E<r._f.length;E++)O=0,U=!1,d=B({},r),r._useUTC!=null&&(d._useUTC=r._useUTC),d._f=r._f[E],Rr(d),I(d)&&(U=!0),O+=C(d).charsLeftOver,O+=C(d).unusedTokens.length*10,C(d).score=O,ge?O<b&&(b=O,h=d):(b==null||O<b||U)&&(b=O,h=d,U&&(ge=!0));S(r,h||d)}function Lh(r){if(!r._d){var d=He(r._i),h=d.day===void 0?d.date:d.day;r._a=g([d.year,d.month,h,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),_r(r)}}function Oh(r){var d=new M(kr(xl(r)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function xl(r){var d=r._i,h=r._f;return r._locale=r._locale||zt(r._l),d===null||h===void 0&&d===""?v({nullInput:!0}):(typeof d=="string"&&(r._i=d=r._locale.preparse(d)),L(d)?new M(kr(d)):(m(d)?r._d=d:i(h)?Rh(r):h?Rr(r):Bh(r),I(r)||(r._d=null),r))}function Bh(r){var d=r._i;u(d)?r._d=new Date(s.now()):m(d)?r._d=new Date(d.valueOf()):typeof d=="string"?Nh(r):i(d)?(r._a=g(d.slice(0),function(h){return parseInt(h,10)}),_r(r)):c(d)?Lh(r):f(d)?r._d=new Date(d):s.createFromInputFallback(r)}function Dl(r,d,h,b,E){var O={};return(d===!0||d===!1)&&(b=d,d=void 0),(h===!0||h===!1)&&(b=h,h=void 0),(c(r)&&p(r)||i(r)&&r.length===0)&&(r=void 0),O._isAMomentObject=!0,O._useUTC=O._isUTC=E,O._l=h,O._i=r,O._f=d,O._strict=b,Oh(O)}function Le(r,d,h,b){return Dl(r,d,h,b,!1)}var Ah=A("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var r=Le.apply(null,arguments);return this.isValid()&&r.isValid()?r<this?this:r:v()}),Ph=A("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var r=Le.apply(null,arguments);return this.isValid()&&r.isValid()?r>this?this:r:v()});function Il(r,d){var h,b;if(d.length===1&&i(d[0])&&(d=d[0]),!d.length)return Le();for(h=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][r](h))&&(h=d[b]);return h}function Fh(){var r=[].slice.call(arguments,0);return Il("isBefore",r)}function Kh(){var r=[].slice.call(arguments,0);return Il("isAfter",r)}var Vh=function(){return Date.now?Date.now():+new Date},ha=["year","quarter","month","week","day","hour","minute","second","millisecond"];function $h(r){var d,h=!1,b;for(d in r)if(l(r,d)&&!(Ue.call(ha,d)!==-1&&(r[d]==null||!isNaN(r[d]))))return!1;for(b=0;b<ha.length;++b)if(r[ha[b]]){if(h)return!1;parseFloat(r[ha[b]])!==Te(r[ha[b]])&&(h=!0)}return!0}function Hh(){return this._isValid}function Wh(){return Nt(NaN)}function Za(r){var d=He(r),h=d.year||0,b=d.quarter||0,E=d.month||0,O=d.week||d.isoWeek||0,U=d.day||0,ge=d.hour||0,xe=d.minute||0,Re=d.second||0,Bt=d.millisecond||0;this._isValid=$h(d),this._milliseconds=+Bt+Re*1e3+xe*6e4+ge*1e3*60*60,this._days=+U+O*7,this._months=+E+b*3+h*12,this._data={},this._locale=zt(),this._bubble()}function Xa(r){return r instanceof Za}function Lr(r){return r<0?Math.round(-1*r)*-1:Math.round(r)}function Gh(r,d,h){var b=Math.min(r.length,d.length),E=Math.abs(r.length-d.length),O=0,U;for(U=0;U<b;U++)(h&&r[U]!==d[U]||!h&&Te(r[U])!==Te(d[U]))&&O++;return O+E}function Nl(r,d){q(r,0,0,function(){var h=this.utcOffset(),b="+";return h<0&&(h=-h,b="-"),b+oe(~~(h/60),2)+d+oe(~~h%60,2)})}Nl("Z",":"),Nl("ZZ",""),ie("Z",Ua),ie("ZZ",Ua),_e(["Z","ZZ"],function(r,d,h){h._useUTC=!0,h._tzm=Or(Ua,r)});var Uh=/([\+\-]|\d\d)/gi;function Or(r,d){var h=(d||"").match(r),b,E,O;return h===null?null:(b=h[h.length-1]||[],E=(b+"").match(Uh)||["-",0,0],O=+(E[1]*60)+Te(E[2]),O===0?0:E[0]==="+"?O:-O)}function Br(r,d){var h,b;return d._isUTC?(h=d.clone(),b=(L(r)||m(r)?r.valueOf():Le(r).valueOf())-h.valueOf(),h._d.setTime(h._d.valueOf()+b),s.updateOffset(h,!1),h):Le(r).local()}function Ar(r){return-Math.round(r._d.getTimezoneOffset())}s.updateOffset=function(){};function Yh(r,d,h){var b=this._offset||0,E;if(!this.isValid())return r!=null?this:NaN;if(r!=null){if(typeof r=="string"){if(r=Or(Ua,r),r===null)return this}else Math.abs(r)<16&&!h&&(r=r*60);return!this._isUTC&&d&&(E=Ar(this)),this._offset=r,this._isUTC=!0,E!=null&&this.add(E,"m"),b!==r&&(!d||this._changeInProgress?Rl(this,Nt(r-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Ar(this)}function zh(r,d){return r!=null?(typeof r!="string"&&(r=-r),this.utcOffset(r,d),this):-this.utcOffset()}function jh(r){return this.utcOffset(0,r)}function qh(r){return this._isUTC&&(this.utcOffset(0,r),this._isUTC=!1,r&&this.subtract(Ar(this),"m")),this}function Jh(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var r=Or(bf,this._i);r!=null?this.utcOffset(r):this.utcOffset(0,!0)}return this}function Zh(r){return this.isValid()?(r=r?Le(r).utcOffset():0,(this.utcOffset()-r)%60==0):!1}function Xh(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Qh(){if(!u(this._isDSTShifted))return this._isDSTShifted;var r={},d;return B(r,this),r=xl(r),r._a?(d=r._isUTC?w(r._a):Le(r._a),this._isDSTShifted=this.isValid()&&Gh(r._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function eg(){return this.isValid()?!this._isUTC:!1}function tg(){return this.isValid()?this._isUTC:!1}function kl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ng=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ag=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Nt(r,d){var h=r,b=null,E,O,U;return Xa(r)?h={ms:r._milliseconds,d:r._days,M:r._months}:f(r)||!isNaN(+r)?(h={},d?h[d]=+r:h.milliseconds=+r):(b=ng.exec(r))?(E=b[1]==="-"?-1:1,h={y:0,d:Te(b[Ot])*E,h:Te(b[ze])*E,m:Te(b[It])*E,s:Te(b[Ut])*E,ms:Te(Lr(b[vn]*1e3))*E}):(b=ag.exec(r))?(E=b[1]==="-"?-1:1,h={y:yn(b[2],E),M:yn(b[3],E),w:yn(b[4],E),d:yn(b[5],E),h:yn(b[6],E),m:yn(b[7],E),s:yn(b[8],E)}):h==null?h={}:typeof h=="object"&&("from"in h||"to"in h)&&(U=sg(Le(h.from),Le(h.to)),h={},h.ms=U.milliseconds,h.M=U.months),O=new Za(h),Xa(r)&&l(r,"_locale")&&(O._locale=r._locale),Xa(r)&&l(r,"_isValid")&&(O._isValid=r._isValid),O}Nt.fn=Za.prototype,Nt.invalid=Wh;function yn(r,d){var h=r&&parseFloat(r.replace(",","."));return(isNaN(h)?0:h)*d}function Ml(r,d){var h={};return h.months=d.month()-r.month()+(d.year()-r.year())*12,r.clone().add(h.months,"M").isAfter(d)&&--h.months,h.milliseconds=+d-+r.clone().add(h.months,"M"),h}function sg(r,d){var h;return r.isValid()&&d.isValid()?(d=Br(d,r),r.isBefore(d)?h=Ml(r,d):(h=Ml(d,r),h.milliseconds=-h.milliseconds,h.months=-h.months),h):{milliseconds:0,months:0}}function _l(r,d){return function(h,b){var E,O;return b!==null&&!isNaN(+b)&&(V(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."),O=h,h=b,b=O),E=Nt(h,b),Rl(this,E,r),this}}function Rl(r,d,h,b){var E=d._milliseconds,O=Lr(d._days),U=Lr(d._months);!r.isValid()||(b=b==null?!0:b,U&&ml(r,gn(r,"Month")+U*h),O&&Bn(r,"Date",gn(r,"Date")+O*h),E&&r._d.setTime(r._d.valueOf()+E*h),b&&s.updateOffset(r,O||U))}var rg=_l(1,"add"),og=_l(-1,"subtract");function Ll(r){return typeof r=="string"||r instanceof String}function ig(r){return L(r)||m(r)||Ll(r)||f(r)||cg(r)||lg(r)||r===null||r===void 0}function lg(r){var d=c(r)&&!p(r),h=!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"],E,O;for(E=0;E<b.length;E+=1)O=b[E],h=h||l(r,O);return d&&h}function cg(r){var d=i(r),h=!1;return d&&(h=r.filter(function(b){return!f(b)&&Ll(r)}).length===0),d&&h}function dg(r){var d=c(r)&&!p(r),h=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],E,O;for(E=0;E<b.length;E+=1)O=b[E],h=h||l(r,O);return d&&h}function pg(r,d){var h=r.diff(d,"days",!0);return h<-6?"sameElse":h<-1?"lastWeek":h<0?"lastDay":h<1?"sameDay":h<2?"nextDay":h<7?"nextWeek":"sameElse"}function ug(r,d){arguments.length===1&&(arguments[0]?ig(arguments[0])?(r=arguments[0],d=void 0):dg(arguments[0])&&(d=arguments[0],r=void 0):(r=void 0,d=void 0));var h=r||Le(),b=Br(h,this).startOf("day"),E=s.calendarFormat(this,b)||"sameElse",O=d&&(W(d[E])?d[E].call(this,h):d[E]);return this.format(O||this.localeData().calendar(E,this,Le(h)))}function mg(){return new M(this)}function fg(r,d){var h=L(r)?r:Le(r);return this.isValid()&&h.isValid()?(d=Se(d)||"millisecond",d==="millisecond"?this.valueOf()>h.valueOf():h.valueOf()<this.clone().startOf(d).valueOf()):!1}function hg(r,d){var h=L(r)?r:Le(r);return this.isValid()&&h.isValid()?(d=Se(d)||"millisecond",d==="millisecond"?this.valueOf()<h.valueOf():this.clone().endOf(d).valueOf()<h.valueOf()):!1}function gg(r,d,h,b){var E=L(r)?r:Le(r),O=L(d)?d:Le(d);return this.isValid()&&E.isValid()&&O.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(E,h):!this.isBefore(E,h))&&(b[1]===")"?this.isBefore(O,h):!this.isAfter(O,h))):!1}function Sg(r,d){var h=L(r)?r:Le(r),b;return this.isValid()&&h.isValid()?(d=Se(d)||"millisecond",d==="millisecond"?this.valueOf()===h.valueOf():(b=h.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function bg(r,d){return this.isSame(r,d)||this.isAfter(r,d)}function vg(r,d){return this.isSame(r,d)||this.isBefore(r,d)}function yg(r,d,h){var b,E,O;if(!this.isValid())return NaN;if(b=Br(r,this),!b.isValid())return NaN;switch(E=(b.utcOffset()-this.utcOffset())*6e4,d=Se(d),d){case"year":O=Qa(this,b)/12;break;case"month":O=Qa(this,b);break;case"quarter":O=Qa(this,b)/3;break;case"second":O=(this-b)/1e3;break;case"minute":O=(this-b)/6e4;break;case"hour":O=(this-b)/36e5;break;case"day":O=(this-b-E)/864e5;break;case"week":O=(this-b-E)/6048e5;break;default:O=this-b}return h?O:tt(O)}function Qa(r,d){if(r.date()<d.date())return-Qa(d,r);var h=(d.year()-r.year())*12+(d.month()-r.month()),b=r.clone().add(h,"months"),E,O;return d-b<0?(E=r.clone().add(h-1,"months"),O=(d-b)/(b-E)):(E=r.clone().add(h+1,"months"),O=(d-b)/(E-b)),-(h+O)||0}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Tg(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function wg(r){if(!this.isValid())return null;var d=r!==!0,h=d?this.clone().utc():this;return h.year()<0||h.year()>9999?Ce(h,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):W(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ce(h,"Z")):Ce(h,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Eg(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var r="moment",d="",h,b,E,O;return this.isLocal()||(r=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),h="["+r+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",E="-MM-DD[T]HH:mm:ss.SSS",O=d+'[")]',this.format(h+b+E+O)}function Cg(r){r||(r=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var d=Ce(this,r);return this.localeData().postformat(d)}function xg(r,d){return this.isValid()&&(L(r)&&r.isValid()||Le(r).isValid())?Nt({to:this,from:r}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function Dg(r){return this.from(Le(),r)}function Ig(r,d){return this.isValid()&&(L(r)&&r.isValid()||Le(r).isValid())?Nt({from:this,to:r}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function Ng(r){return this.to(Le(),r)}function Ol(r){var d;return r===void 0?this._locale._abbr:(d=zt(r),d!=null&&(this._locale=d),this)}var Bl=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(r){return r===void 0?this.localeData():this.locale(r)});function Al(){return this._locale}var es=1e3,Kn=60*es,ts=60*Kn,Pl=(365*400+97)*24*ts;function Vn(r,d){return(r%d+d)%d}function Fl(r,d,h){return r<100&&r>=0?new Date(r+400,d,h)-Pl:new Date(r,d,h).valueOf()}function Kl(r,d,h){return r<100&&r>=0?Date.UTC(r+400,d,h)-Pl:Date.UTC(r,d,h)}function kg(r){var d,h;if(r=Se(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(h=this._isUTC?Kl:Fl,r){case"year":d=h(this.year(),0,1);break;case"quarter":d=h(this.year(),this.month()-this.month()%3,1);break;case"month":d=h(this.year(),this.month(),1);break;case"week":d=h(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=h(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=h(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=Vn(d+(this._isUTC?0:this.utcOffset()*Kn),ts);break;case"minute":d=this._d.valueOf(),d-=Vn(d,Kn);break;case"second":d=this._d.valueOf(),d-=Vn(d,es);break}return this._d.setTime(d),s.updateOffset(this,!0),this}function Mg(r){var d,h;if(r=Se(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(h=this._isUTC?Kl:Fl,r){case"year":d=h(this.year()+1,0,1)-1;break;case"quarter":d=h(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=h(this.year(),this.month()+1,1)-1;break;case"week":d=h(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=h(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=h(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=ts-Vn(d+(this._isUTC?0:this.utcOffset()*Kn),ts)-1;break;case"minute":d=this._d.valueOf(),d+=Kn-Vn(d,Kn)-1;break;case"second":d=this._d.valueOf(),d+=es-Vn(d,es)-1;break}return this._d.setTime(d),s.updateOffset(this,!0),this}function _g(){return this._d.valueOf()-(this._offset||0)*6e4}function Rg(){return Math.floor(this.valueOf()/1e3)}function Lg(){return new Date(this.valueOf())}function Og(){var r=this;return[r.year(),r.month(),r.date(),r.hour(),r.minute(),r.second(),r.millisecond()]}function Bg(){var r=this;return{years:r.year(),months:r.month(),date:r.date(),hours:r.hours(),minutes:r.minutes(),seconds:r.seconds(),milliseconds:r.milliseconds()}}function Ag(){return this.isValid()?this.toISOString():null}function Pg(){return I(this)}function Fg(){return S({},C(this))}function Kg(){return C(this).overflow}function Vg(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}q("N",0,0,"eraAbbr"),q("NN",0,0,"eraAbbr"),q("NNN",0,0,"eraAbbr"),q("NNNN",0,0,"eraName"),q("NNNNN",0,0,"eraNarrow"),q("y",["y",1],"yo","eraYear"),q("y",["yy",2],0,"eraYear"),q("y",["yyy",3],0,"eraYear"),q("y",["yyyy",4],0,"eraYear"),ie("N",Pr),ie("NN",Pr),ie("NNN",Pr),ie("NNNN",Zg),ie("NNNNN",Xg),_e(["N","NN","NNN","NNNN","NNNNN"],function(r,d,h,b){var E=h._locale.erasParse(r,b,h._strict);E?C(h).era=E:C(h).invalidEra=r}),ie("y",Pn),ie("yy",Pn),ie("yyy",Pn),ie("yyyy",Pn),ie("yo",Qg),_e(["y","yy","yyy","yyyy"],st),_e(["yo"],function(r,d,h,b){var E;h._locale._eraYearOrdinalRegex&&(E=r.match(h._locale._eraYearOrdinalRegex)),h._locale.eraYearOrdinalParse?d[st]=h._locale.eraYearOrdinalParse(r,E):d[st]=parseInt(r,10)});function $g(r,d){var h,b,E,O=this._eras||zt("en")._eras;for(h=0,b=O.length;h<b;++h){switch(typeof O[h].since){case"string":E=s(O[h].since).startOf("day"),O[h].since=E.valueOf();break}switch(typeof O[h].until){case"undefined":O[h].until=1/0;break;case"string":E=s(O[h].until).startOf("day").valueOf(),O[h].until=E.valueOf();break}}return O}function Hg(r,d,h){var b,E,O=this.eras(),U,ge,xe;for(r=r.toUpperCase(),b=0,E=O.length;b<E;++b)if(U=O[b].name.toUpperCase(),ge=O[b].abbr.toUpperCase(),xe=O[b].narrow.toUpperCase(),h)switch(d){case"N":case"NN":case"NNN":if(ge===r)return O[b];break;case"NNNN":if(U===r)return O[b];break;case"NNNNN":if(xe===r)return O[b];break}else if([U,ge,xe].indexOf(r)>=0)return O[b]}function Wg(r,d){var h=r.since<=r.until?1:-1;return d===void 0?s(r.since).year():s(r.since).year()+(d-r.offset)*h}function Gg(){var r,d,h,b=this.localeData().eras();for(r=0,d=b.length;r<d;++r)if(h=this.clone().startOf("day").valueOf(),b[r].since<=h&&h<=b[r].until||b[r].until<=h&&h<=b[r].since)return b[r].name;return""}function Ug(){var r,d,h,b=this.localeData().eras();for(r=0,d=b.length;r<d;++r)if(h=this.clone().startOf("day").valueOf(),b[r].since<=h&&h<=b[r].until||b[r].until<=h&&h<=b[r].since)return b[r].narrow;return""}function Yg(){var r,d,h,b=this.localeData().eras();for(r=0,d=b.length;r<d;++r)if(h=this.clone().startOf("day").valueOf(),b[r].since<=h&&h<=b[r].until||b[r].until<=h&&h<=b[r].since)return b[r].abbr;return""}function zg(){var r,d,h,b,E=this.localeData().eras();for(r=0,d=E.length;r<d;++r)if(h=E[r].since<=E[r].until?1:-1,b=this.clone().startOf("day").valueOf(),E[r].since<=b&&b<=E[r].until||E[r].until<=b&&b<=E[r].since)return(this.year()-s(E[r].since).year())*h+E[r].offset;return this.year()}function jg(r){return l(this,"_erasNameRegex")||Fr.call(this),r?this._erasNameRegex:this._erasRegex}function qg(r){return l(this,"_erasAbbrRegex")||Fr.call(this),r?this._erasAbbrRegex:this._erasRegex}function Jg(r){return l(this,"_erasNarrowRegex")||Fr.call(this),r?this._erasNarrowRegex:this._erasRegex}function Pr(r,d){return d.erasAbbrRegex(r)}function Zg(r,d){return d.erasNameRegex(r)}function Xg(r,d){return d.erasNarrowRegex(r)}function Qg(r,d){return d._eraYearOrdinalRegex||Pn}function Fr(){var r=[],d=[],h=[],b=[],E,O,U=this.eras();for(E=0,O=U.length;E<O;++E)d.push(mt(U[E].name)),r.push(mt(U[E].abbr)),h.push(mt(U[E].narrow)),b.push(mt(U[E].name)),b.push(mt(U[E].abbr)),b.push(mt(U[E].narrow));this._erasRegex=new RegExp("^("+b.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+d.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+h.join("|")+")","i")}q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ns(r,d){q(0,[r,r.length],0,d)}ns("gggg","weekYear"),ns("ggggg","weekYear"),ns("GGGG","isoWeekYear"),ns("GGGGG","isoWeekYear"),Ve("weekYear","gg"),Ve("isoWeekYear","GG"),Ge("weekYear",1),Ge("isoWeekYear",1),ie("G",Ga),ie("g",Ga),ie("GG",de,at),ie("gg",de,at),ie("GGGG",ia,An),ie("gggg",ia,An),ie("GGGGG",Wa,ve),ie("ggggg",Wa,ve),ca(["gggg","ggggg","GGGG","GGGGG"],function(r,d,h,b){d[b.substr(0,2)]=Te(r)}),ca(["gg","GG"],function(r,d,h,b){d[b]=s.parseTwoDigitYear(r)});function eS(r){return Vl.call(this,r,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function tS(r){return Vl.call(this,r,this.isoWeek(),this.isoWeekday(),1,4)}function nS(){return Yt(this.year(),1,4)}function aS(){return Yt(this.isoWeekYear(),1,4)}function sS(){var r=this.localeData()._week;return Yt(this.year(),r.dow,r.doy)}function rS(){var r=this.localeData()._week;return Yt(this.weekYear(),r.dow,r.doy)}function Vl(r,d,h,b,E){var O;return r==null?ua(this,b,E).year:(O=Yt(r,b,E),d>O&&(d=O),oS.call(this,r,d,h,b,E))}function oS(r,d,h,b,E){var O=Sl(r,d,h,b,E),U=pa(O.year,0,O.dayOfYear);return this.year(U.getUTCFullYear()),this.month(U.getUTCMonth()),this.date(U.getUTCDate()),this}q("Q",0,"Qo","quarter"),Ve("quarter","Q"),Ge("quarter",7),ie("Q",$a),_e("Q",function(r,d){d[Gt]=(Te(r)-1)*3});function iS(r){return r==null?Math.ceil((this.month()+1)/3):this.month((r-1)*3+this.month()%3)}q("D",["DD",2],"Do","date"),Ve("date","D"),Ge("date",9),ie("D",de),ie("DD",de,at),ie("Do",function(r,d){return r?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),_e(["D","DD"],Ot),_e("Do",function(r,d){d[Ot]=Te(r.match(de)[0])});var $l=yt("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),Ve("dayOfYear","DDD"),Ge("dayOfYear",4),ie("DDD",bn),ie("DDDD",Ha),_e(["DDD","DDDD"],function(r,d,h){h._dayOfYear=Te(r)});function lS(r){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return r==null?d:this.add(r-d,"d")}q("m",["mm",2],0,"minute"),Ve("minute","m"),Ge("minute",14),ie("m",de),ie("mm",de,at),_e(["m","mm"],It);var cS=yt("Minutes",!1);q("s",["ss",2],0,"second"),Ve("second","s"),Ge("second",15),ie("s",de),ie("ss",de,at),_e(["s","ss"],Ut);var dS=yt("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return this.millisecond()*10}),q(0,["SSSSS",5],0,function(){return this.millisecond()*100}),q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Ve("millisecond","ms"),Ge("millisecond",16),ie("S",bn,$a),ie("SS",bn,at),ie("SSS",bn,Ha);var nn,Hl;for(nn="SSSS";nn.length<=9;nn+="S")ie(nn,Pn);function pS(r,d){d[vn]=Te(("0."+r)*1e3)}for(nn="S";nn.length<=9;nn+="S")_e(nn,pS);Hl=yt("Milliseconds",!1),q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");function uS(){return this._isUTC?"UTC":""}function mS(){return this._isUTC?"Coordinated Universal Time":""}var J=M.prototype;J.add=rg,J.calendar=ug,J.clone=mg,J.diff=yg,J.endOf=Mg,J.format=Cg,J.from=xg,J.fromNow=Dg,J.to=Ig,J.toNow=Ng,J.get=wr,J.invalidAt=Kg,J.isAfter=fg,J.isBefore=hg,J.isBetween=gg,J.isSame=Sg,J.isSameOrAfter=bg,J.isSameOrBefore=vg,J.isValid=Pg,J.lang=Bl,J.locale=Ol,J.localeData=Al,J.max=Ph,J.min=Ah,J.parsingFlags=Fg,J.set=Er,J.startOf=kg,J.subtract=og,J.toArray=Og,J.toObject=Bg,J.toDate=Lg,J.toISOString=wg,J.inspect=Eg,typeof Symbol!="undefined"&&Symbol.for!=null&&(J[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),J.toJSON=Ag,J.toString=Tg,J.unix=Rg,J.valueOf=_g,J.creationData=Vg,J.eraName=Gg,J.eraNarrow=Ug,J.eraAbbr=Yg,J.eraYear=zg,J.year=gl,J.isLeapYear=Af,J.weekYear=eS,J.isoWeekYear=tS,J.quarter=J.quarters=iS,J.month=fl,J.daysInMonth=Lf,J.week=J.weeks=Hf,J.isoWeek=J.isoWeeks=Wf,J.weeksInYear=sS,J.weeksInWeekYear=rS,J.isoWeeksInYear=nS,J.isoWeeksInISOWeekYear=aS,J.date=$l,J.day=J.days=nh,J.weekday=ah,J.isoWeekday=sh,J.dayOfYear=lS,J.hour=J.hours=ph,J.minute=J.minutes=cS,J.second=J.seconds=dS,J.millisecond=J.milliseconds=Hl,J.utcOffset=Yh,J.utc=jh,J.local=qh,J.parseZone=Jh,J.hasAlignedHourOffset=Zh,J.isDST=Xh,J.isLocal=eg,J.isUtcOffset=tg,J.isUtc=kl,J.isUTC=kl,J.zoneAbbr=uS,J.zoneName=mS,J.dates=A("dates accessor is deprecated. Use date instead.",$l),J.months=A("months accessor is deprecated. Use month instead",fl),J.years=A("years accessor is deprecated. Use year instead",gl),J.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zh),J.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Qh);function fS(r){return Le(r*1e3)}function hS(){return Le.apply(null,arguments).parseZone()}function Wl(r){return r}var ke=re.prototype;ke.calendar=Z,ke.longDateFormat=$e,ke.invalidDate=et,ke.ordinal=ct,ke.preparse=Wl,ke.postformat=Wl,ke.relativeTime=Ee,ke.pastFuture=We,ke.set=pe,ke.eras=$g,ke.erasParse=Hg,ke.erasConvertYear=Wg,ke.erasAbbrRegex=qg,ke.erasNameRegex=jg,ke.erasNarrowRegex=Jg,ke.months=kf,ke.monthsShort=Mf,ke.monthsParse=Rf,ke.monthsRegex=Bf,ke.monthsShortRegex=Of,ke.week=Ff,ke.firstDayOfYear=$f,ke.firstDayOfWeek=Vf,ke.weekdays=Zf,ke.weekdaysMin=Qf,ke.weekdaysShort=Xf,ke.weekdaysParse=th,ke.weekdaysRegex=rh,ke.weekdaysShortRegex=oh,ke.weekdaysMinRegex=ih,ke.isPM=ch,ke.meridiem=uh;function as(r,d,h,b){var E=zt(),O=w().set(b,d);return E[h](O,r)}function Gl(r,d,h){if(f(r)&&(d=r,r=void 0),r=r||"",d!=null)return as(r,d,h,"month");var b,E=[];for(b=0;b<12;b++)E[b]=as(r,b,h,"month");return E}function Kr(r,d,h,b){typeof r=="boolean"?(f(d)&&(h=d,d=void 0),d=d||""):(d=r,h=d,r=!1,f(d)&&(h=d,d=void 0),d=d||"");var E=zt(),O=r?E._week.dow:0,U,ge=[];if(h!=null)return as(d,(h+O)%7,b,"day");for(U=0;U<7;U++)ge[U]=as(d,(U+O)%7,b,"day");return ge}function gS(r,d){return Gl(r,d,"months")}function SS(r,d){return Gl(r,d,"monthsShort")}function bS(r,d,h){return Kr(r,d,h,"weekdays")}function vS(r,d,h){return Kr(r,d,h,"weekdaysShort")}function yS(r,d,h){return Kr(r,d,h,"weekdaysMin")}tn("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(r){var d=r%10,h=Te(r%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return r+h}}),s.lang=A("moment.lang is deprecated. Use moment.locale instead.",tn),s.langData=A("moment.langData is deprecated. Use moment.localeData instead.",zt);var jt=Math.abs;function TS(){var r=this._data;return this._milliseconds=jt(this._milliseconds),this._days=jt(this._days),this._months=jt(this._months),r.milliseconds=jt(r.milliseconds),r.seconds=jt(r.seconds),r.minutes=jt(r.minutes),r.hours=jt(r.hours),r.months=jt(r.months),r.years=jt(r.years),this}function Ul(r,d,h,b){var E=Nt(d,h);return r._milliseconds+=b*E._milliseconds,r._days+=b*E._days,r._months+=b*E._months,r._bubble()}function wS(r,d){return Ul(this,r,d,1)}function ES(r,d){return Ul(this,r,d,-1)}function Yl(r){return r<0?Math.floor(r):Math.ceil(r)}function CS(){var r=this._milliseconds,d=this._days,h=this._months,b=this._data,E,O,U,ge,xe;return r>=0&&d>=0&&h>=0||r<=0&&d<=0&&h<=0||(r+=Yl(Vr(h)+d)*864e5,d=0,h=0),b.milliseconds=r%1e3,E=tt(r/1e3),b.seconds=E%60,O=tt(E/60),b.minutes=O%60,U=tt(O/60),b.hours=U%24,d+=tt(U/24),xe=tt(zl(d)),h+=xe,d-=Yl(Vr(xe)),ge=tt(h/12),h%=12,b.days=d,b.months=h,b.years=ge,this}function zl(r){return r*4800/146097}function Vr(r){return r*146097/4800}function xS(r){if(!this.isValid())return NaN;var d,h,b=this._milliseconds;if(r=Se(r),r==="month"||r==="quarter"||r==="year")switch(d=this._days+b/864e5,h=this._months+zl(d),r){case"month":return h;case"quarter":return h/3;case"year":return h/12}else switch(d=this._days+Math.round(Vr(this._months)),r){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 "+r)}}function DS(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Te(this._months/12)*31536e6:NaN}function qt(r){return function(){return this.as(r)}}var IS=qt("ms"),NS=qt("s"),kS=qt("m"),MS=qt("h"),_S=qt("d"),RS=qt("w"),LS=qt("M"),OS=qt("Q"),BS=qt("y");function AS(){return Nt(this)}function PS(r){return r=Se(r),this.isValid()?this[r+"s"]():NaN}function Tn(r){return function(){return this.isValid()?this._data[r]:NaN}}var FS=Tn("milliseconds"),KS=Tn("seconds"),VS=Tn("minutes"),$S=Tn("hours"),HS=Tn("days"),WS=Tn("months"),GS=Tn("years");function US(){return tt(this.days()/7)}var Jt=Math.round,$n={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function YS(r,d,h,b,E){return E.relativeTime(d||1,!!h,r,b)}function zS(r,d,h,b){var E=Nt(r).abs(),O=Jt(E.as("s")),U=Jt(E.as("m")),ge=Jt(E.as("h")),xe=Jt(E.as("d")),Re=Jt(E.as("M")),Bt=Jt(E.as("w")),Zt=Jt(E.as("y")),an=O<=h.ss&&["s",O]||O<h.s&&["ss",O]||U<=1&&["m"]||U<h.m&&["mm",U]||ge<=1&&["h"]||ge<h.h&&["hh",ge]||xe<=1&&["d"]||xe<h.d&&["dd",xe];return h.w!=null&&(an=an||Bt<=1&&["w"]||Bt<h.w&&["ww",Bt]),an=an||Re<=1&&["M"]||Re<h.M&&["MM",Re]||Zt<=1&&["y"]||["yy",Zt],an[2]=d,an[3]=+r>0,an[4]=b,YS.apply(null,an)}function jS(r){return r===void 0?Jt:typeof r=="function"?(Jt=r,!0):!1}function qS(r,d){return $n[r]===void 0?!1:d===void 0?$n[r]:($n[r]=d,r==="s"&&($n.ss=d-1),!0)}function JS(r,d){if(!this.isValid())return this.localeData().invalidDate();var h=!1,b=$n,E,O;return typeof r=="object"&&(d=r,r=!1),typeof r=="boolean"&&(h=r),typeof d=="object"&&(b=Object.assign({},$n,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),E=this.localeData(),O=zS(this,!h,b,E),h&&(O=E.pastFuture(+this,O)),E.postformat(O)}var $r=Math.abs;function Hn(r){return(r>0)-(r<0)||+r}function ss(){if(!this.isValid())return this.localeData().invalidDate();var r=$r(this._milliseconds)/1e3,d=$r(this._days),h=$r(this._months),b,E,O,U,ge=this.asSeconds(),xe,Re,Bt,Zt;return ge?(b=tt(r/60),E=tt(b/60),r%=60,b%=60,O=tt(h/12),h%=12,U=r?r.toFixed(3).replace(/\.?0+$/,""):"",xe=ge<0?"-":"",Re=Hn(this._months)!==Hn(ge)?"-":"",Bt=Hn(this._days)!==Hn(ge)?"-":"",Zt=Hn(this._milliseconds)!==Hn(ge)?"-":"",xe+"P"+(O?Re+O+"Y":"")+(h?Re+h+"M":"")+(d?Bt+d+"D":"")+(E||b||r?"T":"")+(E?Zt+E+"H":"")+(b?Zt+b+"M":"")+(r?Zt+U+"S":"")):"P0D"}var De=Za.prototype;De.isValid=Hh,De.abs=TS,De.add=wS,De.subtract=ES,De.as=xS,De.asMilliseconds=IS,De.asSeconds=NS,De.asMinutes=kS,De.asHours=MS,De.asDays=_S,De.asWeeks=RS,De.asMonths=LS,De.asQuarters=OS,De.asYears=BS,De.valueOf=DS,De._bubble=CS,De.clone=AS,De.get=PS,De.milliseconds=FS,De.seconds=KS,De.minutes=VS,De.hours=$S,De.days=HS,De.weeks=US,De.months=WS,De.years=GS,De.humanize=JS,De.toISOString=ss,De.toString=ss,De.toJSON=ss,De.locale=Ol,De.localeData=Al,De.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ss),De.lang=Bl,q("X",0,0,"unix"),q("x",0,0,"valueOf"),ie("x",Ga),ie("X",vf),_e("X",function(r,d,h){h._d=new Date(parseFloat(r)*1e3)}),_e("x",function(r,d,h){h._d=new Date(Te(r))});//! moment.js
|
|
1684
|
+
return s.version="2.29.1",o(Le),s.fn=J,s.min=Fh,s.max=Kh,s.now=Vh,s.utc=w,s.unix=fS,s.months=gS,s.isDate=m,s.locale=tn,s.invalid=v,s.duration=Nt,s.isMoment=L,s.weekdays=bS,s.parseZone=hS,s.localeData=zt,s.isDuration=Xa,s.monthsShort=SS,s.weekdaysMin=yS,s.defineLocale=Nr,s.updateLocale=hh,s.locales=gh,s.weekdaysShort=vS,s.normalizeUnits=Se,s.relativeTimeRounding=jS,s.relativeTimeThreshold=qS,s.calendarFormat=pg,s.prototype=J,s.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"},s})})(Wt);(function(e,t){(function(n,s){s(typeof Pt=="function"?Wt.exports:n.moment)})(At,function(n){//! moment.js locale configuration
|
|
1685
1685
|
var s=n.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(o){var i=o%10,c=~~(o%100/10)==1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return o+c},week:{dow:0,doy:4}});return s})})();(function(e,t){(function(n,s){s(typeof Pt=="function"?Wt.exports:n.moment)})(At,function(n){//! moment.js locale configuration
|
|
1686
1686
|
var s=n.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(o){var i=o%10,c=~~(o%100/10)==1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return o+c}});return s})})();(function(e,t){(function(n,s){s(typeof Pt=="function"?Wt.exports:n.moment)})(At,function(n){//! moment.js locale configuration
|
|
1687
1687
|
var s=n.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(o){var i=o%10,c=~~(o%100/10)==1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return o+c},week:{dow:1,doy:4}});return s})})();(function(e,t){(function(n,s){s(typeof Pt=="function"?Wt.exports:n.moment)})(At,function(n){//! moment.js locale configuration
|
|
@@ -1690,11 +1690,11 @@ var s=n.defineLocale("fr-ca",{months:"janvier_f\xE9vrier_mars_avril_mai_juin_jui
|
|
|
1690
1690
|
var s=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,o=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,i=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,c=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],l=n.defineLocale("fr",{months:"janvier_f\xE9vrier_mars_avril_mai_juin_juillet_ao\xFBt_septembre_octobre_novembre_d\xE9cembre".split("_"),monthsShort:"janv._f\xE9vr._mars_avr._mai_juin_juil._ao\xFBt_sept._oct._nov._d\xE9c.".split("_"),monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:s,monthsShortStrictRegex:o,monthsParse:c,longMonthsParse:c,shortMonthsParse:c,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xE0] LT",nextDay:"[Demain \xE0] LT",nextWeek:"dddd [\xE0] LT",lastDay:"[Hier \xE0] LT",lastWeek:"dddd [dernier \xE0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(p,u){switch(u){case"D":return p+(p===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return p+(p===1?"er":"e");case"w":case"W":return p+(p===1?"re":"e")}},week:{dow:1,doy:4}});return l})})();(function(e,t){(function(n,s){s(typeof Pt=="function"?Wt.exports:n.moment)})(At,function(n){//! moment.js locale configuration
|
|
1691
1691
|
var s="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),o="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],c=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,l=n.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(p,u){return p?/-MMM-/.test(u)?o[p.month()]:s[p.month()]:s},monthsRegex:c,monthsShortRegex:c,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xE9rcoles_jueves_viernes_s\xE1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xE9._jue._vie._s\xE1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xE1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[ma\xF1ana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xEDa",dd:"%d d\xEDas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xF1o",yy:"%d a\xF1os"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%d\xBA",week:{dow:1,doy:4},invalidDate:"Fecha inv\xE1lida"});return l})})();(function(e,t){(function(n,s){s(typeof Pt=="function"?Wt.exports:n.moment)})(At,function(n){//! moment.js locale configuration
|
|
1692
1692
|
var s=n.defineLocale("zh-cn",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(o,i){return o===12&&(o=0),i==="\u51CC\u6668"||i==="\u65E9\u4E0A"||i==="\u4E0A\u5348"?o:i==="\u4E0B\u5348"||i==="\u665A\u4E0A"?o+12:o>=11?o:o+12},meridiem:function(o,i,c){var l=o*100+i;return l<600?"\u51CC\u6668":l<900?"\u65E9\u4E0A":l<1130?"\u4E0A\u5348":l<1230?"\u4E2D\u5348":l<1800?"\u4E0B\u5348":"\u665A\u4E0A"},calendar:{sameDay:"[\u4ECA\u5929]LT",nextDay:"[\u660E\u5929]LT",nextWeek:function(o){return o.week()!==this.week()?"[\u4E0B]dddLT":"[\u672C]dddLT"},lastDay:"[\u6628\u5929]LT",lastWeek:function(o){return this.week()!==o.week()?"[\u4E0A]dddLT":"[\u672C]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(o,i){switch(i){case"d":case"D":case"DDD":return o+"\u65E5";case"M":return o+"\u6708";case"w":case"W":return o+"\u5468";default:return o}},relativeTime:{future:"%s\u540E",past:"%s\u524D",s:"\u51E0\u79D2",ss:"%d \u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",w:"1 \u5468",ww:"%d \u5468",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},week:{dow:1,doy:4}});return s})})();(function(e,t){(function(n,s){s(typeof Pt=="function"?Wt.exports:n.moment)})(At,function(n){//! moment.js locale configuration
|
|
1693
|
-
var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u9031\u65E5_\u9031\u4E00_\u9031\u4E8C_\u9031\u4E09_\u9031\u56DB_\u9031\u4E94_\u9031\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5 HH:mm",LLLL:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(o,i){if(o===12&&(o=0),i==="\u51CC\u6668"||i==="\u65E9\u4E0A"||i==="\u4E0A\u5348")return o;if(i==="\u4E2D\u5348")return o>=11?o:o+12;if(i==="\u4E0B\u5348"||i==="\u665A\u4E0A")return o+12},meridiem:function(o,i,c){var l=o*100+i;return l<600?"\u51CC\u6668":l<900?"\u65E9\u4E0A":l<1130?"\u4E0A\u5348":l<1230?"\u4E2D\u5348":l<1800?"\u4E0B\u5348":"\u665A\u4E0A"},calendar:{sameDay:"[\u4ECA\u5929] LT",nextDay:"[\u660E\u5929] LT",nextWeek:"[\u4E0B]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4E0A]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(o,i){switch(i){case"d":case"D":case"DDD":return o+"\u65E5";case"M":return o+"\u6708";case"w":case"W":return o+"\u9031";default:return o}},relativeTime:{future:"%s\u5F8C",past:"%s\u524D",s:"\u5E7E\u79D2",ss:"%d \u79D2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5C0F\u6642",hh:"%d \u5C0F\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500B\u6708",MM:"%d \u500B\u6708",y:"1 \u5E74",yy:"%d \u5E74"}});return s})})();const aD=rt.default.locale(),oa=rt.default.locales();oa.indexOf("en-US")===-1&&rt.default.defineLocale("en-US",{parentLocale:"en",longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY @ LT",LLLL:"dddd MMMM D, YYYY @ LT"}});oa.indexOf("en-US24")===-1&&rt.default.defineLocale("en-US24",{parentLocale:"en-US",longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss"}});oa.indexOf("en-PH")===-1&&(rt.default.defineLocale("en-PH",{parentLocale:"en-GB"}),rt.default.updateLocale("en-PH",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A"}}));oa.indexOf("en-IN")===-1&&(rt.default.defineLocale("en-IN",{parentLocale:"en-GB"}),rt.default.updateLocale("en-IN",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",ll:"D-MMM-YYYY"}}));oa.indexOf("en-SG")===-1&&(rt.default.defineLocale("en-SG",{parentLocale:"en-IN"}),rt.default.updateLocale("en-SG",{longDateFormat:{ll:"D MMM YYYY"}}));oa.indexOf("en-HK")===-1&&rt.default.defineLocale("en-HK",{parentLocale:"en-GB"});rt.default.locale(aD);const sD={ISO_8601:"ISO_8601",ISO_8601_UTC:"ISO_8601_UTC",SHORT_TIME:"LT",SHORT_TIME_ZONE:"LT z",LONG_TIME:"LTS",LONG_TIME_ZONE:"LTS z",NUM_DATE:"L",SHORT_DATE:"ll",LONG_DATE:"LL",SHORT_DATETIME:"lll",SHORT_DATETIME_ZONE:"lll z",LONG_DATETIME:"LLL",LONG_DATETIME_ZONE:"LLL z",SHORT_FULLDATETIME:"llll",SHORT_FULLDATETIME_ZONE:"llll z",LONG_FULLDATETIME:"LLLL",LONG_FULLDATETIME_ZONE:"LLLL z"},rD={currentUser:"any",dateToFormat:"string | Date",format:"string",locale:"string",relative:"boolean",relativeHrs:"number",tz:"string"},oD=
|
|
1693
|
+
var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u9031\u65E5_\u9031\u4E00_\u9031\u4E8C_\u9031\u4E09_\u9031\u56DB_\u9031\u4E94_\u9031\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5 HH:mm",LLLL:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(o,i){if(o===12&&(o=0),i==="\u51CC\u6668"||i==="\u65E9\u4E0A"||i==="\u4E0A\u5348")return o;if(i==="\u4E2D\u5348")return o>=11?o:o+12;if(i==="\u4E0B\u5348"||i==="\u665A\u4E0A")return o+12},meridiem:function(o,i,c){var l=o*100+i;return l<600?"\u51CC\u6668":l<900?"\u65E9\u4E0A":l<1130?"\u4E0A\u5348":l<1230?"\u4E2D\u5348":l<1800?"\u4E0B\u5348":"\u665A\u4E0A"},calendar:{sameDay:"[\u4ECA\u5929] LT",nextDay:"[\u660E\u5929] LT",nextWeek:"[\u4E0B]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4E0A]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(o,i){switch(i){case"d":case"D":case"DDD":return o+"\u65E5";case"M":return o+"\u6708";case"w":case"W":return o+"\u9031";default:return o}},relativeTime:{future:"%s\u5F8C",past:"%s\u524D",s:"\u5E7E\u79D2",ss:"%d \u79D2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5C0F\u6642",hh:"%d \u5C0F\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500B\u6708",MM:"%d \u500B\u6708",y:"1 \u5E74",yy:"%d \u5E74"}});return s})})();const aD=rt.default.locale(),oa=rt.default.locales();oa.indexOf("en-US")===-1&&rt.default.defineLocale("en-US",{parentLocale:"en",longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY @ LT",LLLL:"dddd MMMM D, YYYY @ LT"}});oa.indexOf("en-US24")===-1&&rt.default.defineLocale("en-US24",{parentLocale:"en-US",longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss"}});oa.indexOf("en-PH")===-1&&(rt.default.defineLocale("en-PH",{parentLocale:"en-GB"}),rt.default.updateLocale("en-PH",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A"}}));oa.indexOf("en-IN")===-1&&(rt.default.defineLocale("en-IN",{parentLocale:"en-GB"}),rt.default.updateLocale("en-IN",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",ll:"D-MMM-YYYY"}}));oa.indexOf("en-SG")===-1&&(rt.default.defineLocale("en-SG",{parentLocale:"en-IN"}),rt.default.updateLocale("en-SG",{longDateFormat:{ll:"D MMM YYYY"}}));oa.indexOf("en-HK")===-1&&rt.default.defineLocale("en-HK",{parentLocale:"en-GB"});rt.default.locale(aD);const sD={ISO_8601:"ISO_8601",ISO_8601_UTC:"ISO_8601_UTC",SHORT_TIME:"LT",SHORT_TIME_ZONE:"LT z",LONG_TIME:"LTS",LONG_TIME_ZONE:"LTS z",NUM_DATE:"L",SHORT_DATE:"ll",LONG_DATE:"LL",SHORT_DATETIME:"lll",SHORT_DATETIME_ZONE:"lll z",LONG_DATETIME:"LLL",LONG_DATETIME_ZONE:"LLL z",SHORT_FULLDATETIME:"llll",SHORT_FULLDATETIME_ZONE:"llll z",LONG_FULLDATETIME:"LLLL",LONG_FULLDATETIME_ZONE:"LLLL z"},rD={currentUser:"any",dateToFormat:"string | Date",format:"string",locale:"string",relative:"boolean",relativeHrs:"number",tz:"string"},oD=G(N({},Y),{currentUser:y.exports.any,dateToFormat:y.exports.oneOfType([y.exports.string,y.exports.instanceOf(Date)]),format:y.exports.string,locale:y.exports.string,relative:y.exports.bool,relativeHrs:y.exports.number,tz:y.exports.string});function iD(e,t,n){if(!n&&!t)return!1;if(t)return!0;const s=rt.default(e);return rt.default().diff(s,"hours")<n}function lD({locale:e=window.navigator.language,tz:t=rt.default.tz.guess(),dateToFormat:n,format:s,currentUser:o,relative:i,relativeHrs:c,children:l}){let p=t,u=e;o&&o.preferences&&(p=p||o.preferences.timezone,u=u||o.preferences.locale);const f=s?sD[s]:"lll",m=n||String(l),g=rt.default(m);if(g.locale(u),!g.isValid())throw new Error("invalid date");return g.tz(p),iD(m,i,c)?g.fromNow():g.format(f)}function Si(e){const f=e,{dateToFormat:t,locale:n,tz:s,format:o,currentUser:i,relative:c,relativeHrs:l,children:p}=f,u=z(f,["dateToFormat","locale","tz","format","currentUser","relative","relativeHrs","children"]);return a.createElement("span",N({className:"sps-datetime"},u),lD({locale:n,tz:s,dateToFormat:t,format:o,currentUser:i,relative:c,relativeHrs:l,children:p}))}Object.assign(Si,{props:rD,propTypes:oD,displayName:"SpsDateTime"});const Iu={basic:{label:"Datetime Component",description:"<p>Formats dates</p>",examples:{basicAttribute:{jsx:T.code`
|
|
1694
1694
|
<SpsDateTime dateToFormat="2018-09-11T16:32:52.822000Z" />
|
|
1695
1695
|
`},basicChild:{jsx:T.code`
|
|
1696
1696
|
<SpsDateTime>2018-09-11T16:32:52.822000Z</SpsDateTime>
|
|
1697
|
-
`}}}},Nu={compact:"boolean",wideTerms:"boolean",widerTerms:"boolean"},ku=H(k({},Y),{compact:y.exports.bool,wideTerms:y.exports.bool,widerTerms:y.exports.bool});function er(e){const m=e,{children:t,className:n,compact:s=!1,"data-testid":o,unsafelyReplaceClassName:i,wideTerms:c=!1,widerTerms:l=!1}=m,p=z(m,["children","className","compact","data-testid","unsafelyReplaceClassName","wideTerms","widerTerms"]),u=a.Children.map(t,(g,S)=>{if(g.type.toString()!==a.Fragment.toString()){const E=parseInt(`${S/2}`,10)+1;return a.cloneElement(g,{style:H(k({},g.props.style),{msGridRow:E})})}const w=g.props.children;return a.Children.map(w,E=>a.cloneElement(E,{style:H(k({},E.props.style),{msGridRow:S+1})}))}),f=K(i||"sps-description-list",s&&"sps-description-list--compact",c&&"sps-description-list--wide-terms",l&&"sps-description-list--wider-terms",n);return a.createElement("dl",k({className:f,"data-testid":`${o}`},p),u)}Object.assign(er,{props:Nu,propTypes:ku,displayName:"SpsDescriptionList / SpsDl"});function Mu(e){return er(e)}Object.assign(Mu,{props:Nu,propTypes:ku,displayName:"SpsDescriptionList / SpsDl"});const _u={},Ru=k({},Y);function tr(e){const l=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName"]),c=K(o||"sps-description-list__definition",n);return a.createElement("dd",k({className:c,"data-testid":`${s}`},i),t)}Object.assign(tr,{props:_u,propTypes:Ru,displayName:"SpsDescriptionListDefinition / SpsDd"});function Lu(e){return tr(e)}Object.assign(Lu,{props:_u,propTypes:Ru,displayName:"SpsDescriptionListDefinition / SpsDd"});exports.TooltipVisibility=void 0;(function(e){e.VISIBLE="visible",e.DEFER_VISIBLE="defer_visible",e.HIDDEN="hidden",e.DELAYED_HIDDEN="delayed_hidden"})(exports.TooltipVisibility||(exports.TooltipVisibility={}));function nr(e){return e===exports.TooltipVisibility.VISIBLE?exports.TooltipVisibility.HIDDEN:exports.TooltipVisibility.VISIBLE}const Ou=13,Rn=new Map,cD={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"},dD=H(k({},Y),{for:y.exports.oneOfType([Ft(),y.exports.string]).isRequired,hideDelay:y.exports.number,isShown:be(exports.TooltipVisibility),kind:be(M.TooltipKind),offsets:y.exports.arrayOf(y.exports.number),onDeferred:ne(),position:be(M.Position),altPosition:be(M.Position),showOn:be(M.TooltipShowTrigger),title:y.exports.string||y.exports.node});function Dt({children:e,className:t,for:n,"data-testid":s,hideDelay:o=M.TOOLTIP_HIDE_DELAY_MS_DEFAULT,isShown:i,kind:c=M.TooltipKind.DEFAULT,offsets:l=[0,0],onDeferred:p,position:u=M.Position.TOP_MIDDLE,altPosition:f=wc(u),showOn:m=M.TooltipShowTrigger.MOUSEOVER,style:g,title:S,unsafelyReplaceClassName:w}){const x=a.useRef({instanceKey:Symbol("ds-react:tooltip:instance-key"),prevIsShown:i,hideTimer:null}),[E,D]=a.useState(!1),I=a.useRef(null),v=typeof n=="string"?a.useRef(document.getElementById(n)):n,N=a.useRef(null),_=a.useCallback(()=>{x.current.hideTimer&&(window.clearTimeout(x.current.hideTimer),x.current.hideTimer=null)},[]),O=a.useCallback(()=>{_(),D(!1)},[]),R=a.useCallback((j=!1)=>{if(j===!0&&Rn.size>0)return p&&p(),!1;if(I.current.textContent==="")return console.warn("SpsTooltip is empty; aborting show"),!1;_();for(const Z of Rn.values())Z();return D(!0),!0},[]),B=a.useCallback(j=>{j&&j.stopPropagation(),D(Z=>Z?(O(),!1):R())},[]),F=a.useCallback(j=>{I.current&&!I.current.contains(j.target)&&O()},[]),P=a.useCallback(()=>{_(),x.current.hideTimer=window.setTimeout(O,o)},[]),U=a.useCallback(j=>{var q,ye,Ie,Ce,we,Ke;const[Z,oe]=j.split(" "),ee=(q=v==null?void 0:v.current)==null?void 0:q.getBoundingClientRect(),te=N.current?parseInt(((ye=getComputedStyle(N.current))==null?void 0:ye.width)||"0",10):0,X=te*Math.sqrt(2),le=(X-te)/2;if(["top","bottom"].includes(Z)&&oe!=="middle"){if(!(ee==null?void 0:ee.width)||ee.width>50)return 0;const $e=N.current?parseInt(((Ie=getComputedStyle(N.current))==null?void 0:Ie.left)||"0",10):0,je=N.current?parseInt(((Ce=getComputedStyle(N.current))==null?void 0:Ce.right)||"0",10):0,qe=($e<je?$e:je)-le+X/2;return ee.width/2-qe}else if(["left","right"].includes(Z)&&oe!=="middle"){if((ee==null?void 0:ee.height)&&ee.height>50)return 0;const $e=N.current?parseInt(((we=getComputedStyle(N.current))==null?void 0:we.top)||"0",10):0,je=N.current?parseInt(((Ke=getComputedStyle(N.current))==null?void 0:Ke.bottom)||"0",10):0,qe=($e<je?$e:je)-le+X/2;return ee.height/2-qe}else return 0},[]);a.useEffect(()=>{if(typeof n=="string"&&(v.current=document.getElementById(n)),E?Rn.set(x.current.instanceKey,O):Rn.has(x.current.instanceKey)&&Rn.delete(x.current.instanceKey),m===M.TooltipShowTrigger.MANUAL){if(i!==x.current.prevIsShown)switch(i){case exports.TooltipVisibility.VISIBLE:R();break;case exports.TooltipVisibility.DEFER_VISIBLE:R(!0);break;case exports.TooltipVisibility.HIDDEN:O();break;case exports.TooltipVisibility.DELAYED_HIDDEN:P();break}x.current.prevIsShown=i}},[E,i]),a.useEffect(()=>{if(v.current)switch(m){case M.TooltipShowTrigger.MOUSEOVER:v.current.addEventListener("mouseenter",R),v.current.addEventListener("mouseleave",P);break;case M.TooltipShowTrigger.CLICK:v.current.addEventListener("click",B),document.addEventListener("click",F);break;case M.TooltipShowTrigger.MANUAL:break}},[v]),a.useEffect(()=>{I.current.textContent===""&&E&&(x.current.hideTimer&&(clearTimeout(x.current.hideTimer),x.current.hideTimer=null),D(!1))},[e,E]),a.useEffect(()=>()=>{Rn.has(x.current.instanceKey)&&Rn.delete(x.current.instanceKey),v.current&&(v.current.removeEventListener("mouseenter",R),v.current.removeEventListener("mouseleave",P),v.current.removeEventListener("click",B),document.removeEventListener("click",F))},[]);const V=zn("sps-tooltip-portal"),W=a.useContext(Mt),[[pe,me],re]=a.useState([{},!1]);a.useEffect(()=>{re(E?Cn(I,v,u,k({altPosition:f,setMinWidth:!1,offsets:[l[0]-Ou,l[1]+U(u)]},W)):[{},!1])},[E,u,f,l[0],l[1],e]),a.useEffect(()=>{const j=()=>{E&&re(Cn(I,v,u,k({altPosition:f,setMinWidth:!1,offsets:[l[0]-Ou,l[1]+U(u)]},W)))};return document.addEventListener("scroll",j),()=>{document.removeEventListener("scroll",j)}},[E]);const se=K(w||"sps-tooltip","z-stratum-tip",`sps-tooltip--${c}`,`sps-tooltip--pos-${(me?f:u).replace(" ","-")}`,E&&"sps-tooltip--shown",t);return V(a.createElement("div",{role:"tooltip",className:se,"data-testid":s,ref:I,style:k(k({},g),pe),onMouseEnter:m===M.TooltipShowTrigger.MOUSEOVER?_:null,onMouseLeave:m===M.TooltipShowTrigger.MOUSEOVER?P:null},S&&(typeof S=="string"?a.createElement("span",{className:"sps-tooltip__title d-block"},S):S),a.createElement("span",{className:"sps-tooltip__body d-block"},e),a.createElement("span",{ref:N,className:"sps-tooltip__caret"})))}Object.assign(Dt,{props:cD,propTypes:dD,displayName:"SpsTooltip"});const Bu={error:"boolean",errors:"ReactNodeOrRenderFn",help:"ReactNodeOrRenderFn",labelFor:"SpsFormFieldMeta<any>",required:"boolean"},Au=H(k({},Y),{error:y.exports.bool,errors:dt,help:dt,labelFor:y.exports.oneOfType([ce(),ce()]),required:y.exports.bool});function ar(e){const v=e,{children:t,className:n,error:s,errors:o,help:i,labelFor:c,required:l,"data-testid":p,unsafelyReplaceClassName:u}=v,f=z(v,["children","className","error","errors","help","labelFor","required","data-testid","unsafelyReplaceClassName"]);function m(){return c&&!c.isPristine()&&!c.isValid()}const g=a.useRef(),[S,w]=a.useState(),[x,E]=a.useState(exports.TooltipVisibility.HIDDEN);a.useEffect(()=>{w(m()?M.TooltipKind.ERROR:M.TooltipKind.HELP)}),c&&(c.onFocus=()=>E(exports.TooltipVisibility.VISIBLE),c.onBlur=()=>E(exports.TooltipVisibility.HIDDEN));const D=K(u||"sps-description-list__term",(l||c&&c.isRequired())&&"sps-description-list__term--required",(s||m())&&"sps-description-list__term--error",n);function I(){E(x===exports.TooltipVisibility.VISIBLE?exports.TooltipVisibility.HIDDEN:exports.TooltipVisibility.VISIBLE)}return a.createElement(a.Fragment,null,a.createElement("dt",k({className:D,"data-testid":`${p}`,ref:g,onMouseEnter:()=>E(exports.TooltipVisibility.VISIBLE),onMouseLeave:()=>E(exports.TooltipVisibility.DELAYED_HIDDEN),onClick:I},f),t),a.createElement(Dt,{kind:S,for:g,showOn:M.TooltipShowTrigger.MANUAL,isShown:x},ft(S===M.TooltipKind.ERROR?o:i)))}Object.assign(ar,{props:Bu,propTypes:Au,displayName:"SpsDescriptionListTerm / SpsDt"});function Pu(e){return ar(e)}Object.assign(Pu,{props:Bu,propTypes:Au,displayName:"SpsDescriptionListTerm / SpsDt"});const Fu={general:{label:"General Usage",description:()=>A.default.createElement(A.default.Fragment,null,A.default.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."),A.default.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."),A.default.createElement("h5",null,"Use a Description List"),A.default.createElement("ul",null,A.default.createElement("li",{className:"mb-2"},"To display two or more terms that have accompanying descriptions or values.")),A.default.createElement("h5",null,"Do Not Use a Description List"),A.default.createElement("ul",null,A.default.createElement("li",{className:"mb-2"},"To display a single term"),A.default.createElement("li",{className:"mb-2"},"If the listed terms do not have descriptions")))},basic:{label:"Basic Description Lists",description:()=>A.default.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:()=>A.default.createElement("h5",null,"1-to-3"),react:T.code`
|
|
1697
|
+
`}}}},Nu={compact:"boolean",wideTerms:"boolean",widerTerms:"boolean"},ku=G(N({},Y),{compact:y.exports.bool,wideTerms:y.exports.bool,widerTerms:y.exports.bool});function er(e){const m=e,{children:t,className:n,compact:s=!1,"data-testid":o,unsafelyReplaceClassName:i,wideTerms:c=!1,widerTerms:l=!1}=m,p=z(m,["children","className","compact","data-testid","unsafelyReplaceClassName","wideTerms","widerTerms"]),u=a.Children.map(t,(g,S)=>{if(g.type.toString()!==a.Fragment.toString()){const C=parseInt(`${S/2}`,10)+1;return a.cloneElement(g,{style:G(N({},g.props.style),{msGridRow:C})})}const w=g.props.children;return a.Children.map(w,C=>a.cloneElement(C,{style:G(N({},C.props.style),{msGridRow:S+1})}))}),f=K(i||"sps-description-list",s&&"sps-description-list--compact",c&&"sps-description-list--wide-terms",l&&"sps-description-list--wider-terms",n);return a.createElement("dl",N({className:f,"data-testid":`${o}`},p),u)}Object.assign(er,{props:Nu,propTypes:ku,displayName:"SpsDescriptionList / SpsDl"});function Mu(e){return er(e)}Object.assign(Mu,{props:Nu,propTypes:ku,displayName:"SpsDescriptionList / SpsDl"});const _u={},Ru=N({},Y);function tr(e){const l=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName"]),c=K(o||"sps-description-list__definition",n);return a.createElement("dd",N({className:c,"data-testid":`${s}`},i),t)}Object.assign(tr,{props:_u,propTypes:Ru,displayName:"SpsDescriptionListDefinition / SpsDd"});function Lu(e){return tr(e)}Object.assign(Lu,{props:_u,propTypes:Ru,displayName:"SpsDescriptionListDefinition / SpsDd"});exports.TooltipVisibility=void 0;(function(e){e.VISIBLE="visible",e.DEFER_VISIBLE="defer_visible",e.HIDDEN="hidden",e.DELAYED_HIDDEN="delayed_hidden"})(exports.TooltipVisibility||(exports.TooltipVisibility={}));function nr(e){return e===exports.TooltipVisibility.VISIBLE?exports.TooltipVisibility.HIDDEN:exports.TooltipVisibility.VISIBLE}const Ou=13,Rn=new Map,cD={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"},dD=G(N({},Y),{for:y.exports.oneOfType([Ft(),y.exports.string]).isRequired,hideDelay:y.exports.number,isShown:be(exports.TooltipVisibility),kind:be(_.TooltipKind),offsets:y.exports.arrayOf(y.exports.number),onDeferred:ne(),position:be(_.Position),altPosition:be(_.Position),showOn:be(_.TooltipShowTrigger),title:y.exports.string||y.exports.node});function Dt({children:e,className:t,for:n,"data-testid":s,hideDelay:o=_.TOOLTIP_HIDE_DELAY_MS_DEFAULT,isShown:i,kind:c=_.TooltipKind.DEFAULT,offsets:l=[0,0],onDeferred:p,position:u=_.Position.TOP_MIDDLE,altPosition:f=wc(u),showOn:m=_.TooltipShowTrigger.MOUSEOVER,style:g,title:S,unsafelyReplaceClassName:w}){const x=a.useRef({instanceKey:Symbol("ds-react:tooltip:instance-key"),prevIsShown:i,hideTimer:null}),[C,D]=a.useState(!1),I=a.useRef(null),v=typeof n=="string"?a.useRef(document.getElementById(n)):n,k=a.useRef(null),R=a.useCallback(()=>{x.current.hideTimer&&(window.clearTimeout(x.current.hideTimer),x.current.hideTimer=null)},[]),B=a.useCallback(()=>{R(),D(!1)},[]),M=a.useCallback((j=!1)=>{if(j===!0&&Rn.size>0)return p&&p(),!1;if(I.current.textContent==="")return console.warn("SpsTooltip is empty; aborting show"),!1;R();for(const Z of Rn.values())Z();return D(!0),!0},[]),L=a.useCallback(j=>{j&&j.stopPropagation(),D(Z=>Z?(B(),!1):M())},[]),F=a.useCallback(j=>{I.current&&!I.current.contains(j.target)&&B()},[]),A=a.useCallback(()=>{R(),x.current.hideTimer=window.setTimeout(B,o)},[]),$=a.useCallback(j=>{var q,ye,Ie,Ce,we,Ke;const[Z,oe]=j.split(" "),ee=(q=v==null?void 0:v.current)==null?void 0:q.getBoundingClientRect(),te=k.current?parseInt(((ye=getComputedStyle(k.current))==null?void 0:ye.width)||"0",10):0,X=te*Math.sqrt(2),le=(X-te)/2;if(["top","bottom"].includes(Z)&&oe!=="middle"){if(!(ee==null?void 0:ee.width)||ee.width>50)return 0;const $e=k.current?parseInt(((Ie=getComputedStyle(k.current))==null?void 0:Ie.left)||"0",10):0,je=k.current?parseInt(((Ce=getComputedStyle(k.current))==null?void 0:Ce.right)||"0",10):0,qe=($e<je?$e:je)-le+X/2;return ee.width/2-qe}else if(["left","right"].includes(Z)&&oe!=="middle"){if((ee==null?void 0:ee.height)&&ee.height>50)return 0;const $e=k.current?parseInt(((we=getComputedStyle(k.current))==null?void 0:we.top)||"0",10):0,je=k.current?parseInt(((Ke=getComputedStyle(k.current))==null?void 0:Ke.bottom)||"0",10):0,qe=($e<je?$e:je)-le+X/2;return ee.height/2-qe}else return 0},[]);a.useEffect(()=>{if(typeof n=="string"&&(v.current=document.getElementById(n)),C?Rn.set(x.current.instanceKey,B):Rn.has(x.current.instanceKey)&&Rn.delete(x.current.instanceKey),m===_.TooltipShowTrigger.MANUAL){if(i!==x.current.prevIsShown)switch(i){case exports.TooltipVisibility.VISIBLE:M();break;case exports.TooltipVisibility.DEFER_VISIBLE:M(!0);break;case exports.TooltipVisibility.HIDDEN:B();break;case exports.TooltipVisibility.DELAYED_HIDDEN:A();break}x.current.prevIsShown=i}},[C,i]),a.useEffect(()=>{if(v.current)switch(m){case _.TooltipShowTrigger.MOUSEOVER:v.current.addEventListener("mouseenter",M),v.current.addEventListener("mouseleave",A);break;case _.TooltipShowTrigger.CLICK:v.current.addEventListener("click",L),document.addEventListener("click",F);break;case _.TooltipShowTrigger.MANUAL:break}},[v]),a.useEffect(()=>{I.current.textContent===""&&C&&(x.current.hideTimer&&(clearTimeout(x.current.hideTimer),x.current.hideTimer=null),D(!1))},[e,C]),a.useEffect(()=>()=>{Rn.has(x.current.instanceKey)&&Rn.delete(x.current.instanceKey),v.current&&(v.current.removeEventListener("mouseenter",M),v.current.removeEventListener("mouseleave",A),v.current.removeEventListener("click",L),document.removeEventListener("click",F))},[]);const V=zn("sps-tooltip-portal"),W=a.useContext(Mt),[[pe,me],re]=a.useState([{},!1]);a.useEffect(()=>{re(C?Cn(I,v,u,N({altPosition:f,setMinWidth:!1,offsets:[l[0]-Ou,l[1]+$(u)]},W)):[{},!1])},[C,u,f,l[0],l[1],e]),a.useEffect(()=>{const j=()=>{C&&re(Cn(I,v,u,N({altPosition:f,setMinWidth:!1,offsets:[l[0]-Ou,l[1]+$(u)]},W)))};return document.addEventListener("scroll",j),()=>{document.removeEventListener("scroll",j)}},[C]);const se=K(w||"sps-tooltip","z-stratum-tip",`sps-tooltip--${c}`,`sps-tooltip--pos-${(me?f:u).replace(" ","-")}`,C&&"sps-tooltip--shown",t);return V(a.createElement("div",{role:"tooltip",className:se,"data-testid":s,ref:I,style:N(N({},g),pe),onMouseEnter:m===_.TooltipShowTrigger.MOUSEOVER?R:null,onMouseLeave:m===_.TooltipShowTrigger.MOUSEOVER?A:null},S&&(typeof S=="string"?a.createElement("span",{className:"sps-tooltip__title d-block"},S):S),a.createElement("span",{className:"sps-tooltip__body d-block"},e),a.createElement("span",{ref:k,className:"sps-tooltip__caret"})))}Object.assign(Dt,{props:cD,propTypes:dD,displayName:"SpsTooltip"});const Bu={error:"boolean",errors:"ReactNodeOrRenderFn",help:"ReactNodeOrRenderFn",labelFor:"SpsFormFieldMeta<any>",required:"boolean"},Au=G(N({},Y),{error:y.exports.bool,errors:dt,help:dt,labelFor:y.exports.oneOfType([ce(),ce()]),required:y.exports.bool});function ar(e){const v=e,{children:t,className:n,error:s,errors:o,help:i,labelFor:c,required:l,"data-testid":p,unsafelyReplaceClassName:u}=v,f=z(v,["children","className","error","errors","help","labelFor","required","data-testid","unsafelyReplaceClassName"]);function m(){return c&&!c.isPristine()&&!c.isValid()}const g=a.useRef(),[S,w]=a.useState(),[x,C]=a.useState(exports.TooltipVisibility.HIDDEN);a.useEffect(()=>{w(m()?_.TooltipKind.ERROR:_.TooltipKind.HELP)}),c&&(c.onFocus=()=>C(exports.TooltipVisibility.VISIBLE),c.onBlur=()=>C(exports.TooltipVisibility.HIDDEN));const D=K(u||"sps-description-list__term",(l||c&&c.isRequired())&&"sps-description-list__term--required",(s||m())&&"sps-description-list__term--error",n);function I(){C(x===exports.TooltipVisibility.VISIBLE?exports.TooltipVisibility.HIDDEN:exports.TooltipVisibility.VISIBLE)}return a.createElement(a.Fragment,null,a.createElement("dt",N({className:D,"data-testid":`${p}`,ref:g,onMouseEnter:()=>C(exports.TooltipVisibility.VISIBLE),onMouseLeave:()=>C(exports.TooltipVisibility.DELAYED_HIDDEN),onClick:I},f),t),a.createElement(Dt,{kind:S,for:g,showOn:_.TooltipShowTrigger.MANUAL,isShown:x},ft(S===_.TooltipKind.ERROR?o:i)))}Object.assign(ar,{props:Bu,propTypes:Au,displayName:"SpsDescriptionListTerm / SpsDt"});function Pu(e){return ar(e)}Object.assign(Pu,{props:Bu,propTypes:Au,displayName:"SpsDescriptionListTerm / SpsDt"});const Fu={general:{label:"General Usage",description:()=>P.default.createElement(P.default.Fragment,null,P.default.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."),P.default.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."),P.default.createElement("h5",null,"Use a Description List"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"To display two or more terms that have accompanying descriptions or values.")),P.default.createElement("h5",null,"Do Not Use a Description List"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"To display a single term"),P.default.createElement("li",{className:"mb-2"},"If the listed terms do not have descriptions")))},basic:{label:"Basic Description Lists",description:()=>P.default.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:()=>P.default.createElement("h5",null,"1-to-3"),react:T.code`
|
|
1698
1698
|
function DemoComponent() {
|
|
1699
1699
|
return (
|
|
1700
1700
|
<SpsDl>
|
|
@@ -1707,7 +1707,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1707
1707
|
</SpsDl>
|
|
1708
1708
|
)
|
|
1709
1709
|
}
|
|
1710
|
-
`},oneToTwo:{description:()=>
|
|
1710
|
+
`},oneToTwo:{description:()=>P.default.createElement("h5",null,"1-to-2"),react:T.code`
|
|
1711
1711
|
function DemoComponent() {
|
|
1712
1712
|
return (
|
|
1713
1713
|
<SpsDl wideTerms>
|
|
@@ -1720,7 +1720,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1720
1720
|
</SpsDl>
|
|
1721
1721
|
)
|
|
1722
1722
|
}
|
|
1723
|
-
`},oneToOne:{description:()=>
|
|
1723
|
+
`},oneToOne:{description:()=>P.default.createElement("h5",null,"1-to-1"),react:T.code`
|
|
1724
1724
|
function DemoComponent() {
|
|
1725
1725
|
return (
|
|
1726
1726
|
<SpsDl widerTerms>
|
|
@@ -1733,7 +1733,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1733
1733
|
</SpsDl>
|
|
1734
1734
|
)
|
|
1735
1735
|
}
|
|
1736
|
-
`},compactOneToThree:{description:()=>
|
|
1736
|
+
`},compactOneToThree:{description:()=>P.default.createElement("h5",null,"Compact 1-to-3"),react:T.code`
|
|
1737
1737
|
function DemoComponent() {
|
|
1738
1738
|
return (
|
|
1739
1739
|
<SpsDl compact>
|
|
@@ -1746,7 +1746,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1746
1746
|
</SpsDl>
|
|
1747
1747
|
)
|
|
1748
1748
|
}
|
|
1749
|
-
`},compactOneToTwo:{description:()=>
|
|
1749
|
+
`},compactOneToTwo:{description:()=>P.default.createElement("h5",null,"Compact 1-to-2"),react:T.code`
|
|
1750
1750
|
function DemoComponent() {
|
|
1751
1751
|
return (
|
|
1752
1752
|
<SpsDl compact wideTerms>
|
|
@@ -1759,7 +1759,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1759
1759
|
</SpsDl>
|
|
1760
1760
|
)
|
|
1761
1761
|
}
|
|
1762
|
-
`},compactOneToOne:{description:()=>
|
|
1762
|
+
`},compactOneToOne:{description:()=>P.default.createElement("h5",null,"Compact 1-to-1"),react:T.code`
|
|
1763
1763
|
function DemoComponent() {
|
|
1764
1764
|
return (
|
|
1765
1765
|
<SpsDl compact widerTerms>
|
|
@@ -1772,7 +1772,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1772
1772
|
</SpsDl>
|
|
1773
1773
|
)
|
|
1774
1774
|
}
|
|
1775
|
-
`}}},inputFields:{label:"Description Lists with Input Fields",description:({NavigateTo:e})=>
|
|
1775
|
+
`}}},inputFields:{label:"Description Lists with Input Fields",description:({NavigateTo:e})=>P.default.createElement(P.default.Fragment,null,P.default.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."),P.default.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."),P.default.createElement("p",null,"Input Fields inside of Description Lists should follow standard Form rules. Visit the"," ",P.default.createElement(e,{to:"form"},"Forms")," page for more information regarding Form rules."),P.default.createElement("p",null,P.default.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:()=>P.default.createElement("h5",null,"1-to-3"),react:T.code`
|
|
1776
1776
|
function DemoComponent() {
|
|
1777
1777
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
1778
1778
|
term1: "",
|
|
@@ -1825,7 +1825,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1825
1825
|
</SpsForm>
|
|
1826
1826
|
)
|
|
1827
1827
|
}
|
|
1828
|
-
`},oneToTwo:{description:()=>
|
|
1828
|
+
`},oneToTwo:{description:()=>P.default.createElement("h5",null,"1-to-2"),react:T.code`
|
|
1829
1829
|
function DemoComponent() {
|
|
1830
1830
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
1831
1831
|
term1: "",
|
|
@@ -1873,7 +1873,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1873
1873
|
</SpsForm>
|
|
1874
1874
|
)
|
|
1875
1875
|
}
|
|
1876
|
-
`},oneToOne:{description:()=>
|
|
1876
|
+
`},oneToOne:{description:()=>P.default.createElement("h5",null,"1-to-1"),react:T.code`
|
|
1877
1877
|
function DemoComponent() {
|
|
1878
1878
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
1879
1879
|
term1: "",
|
|
@@ -1920,7 +1920,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1920
1920
|
</SpsForm>
|
|
1921
1921
|
)
|
|
1922
1922
|
}
|
|
1923
|
-
`},compactOneToThree:{description:()=>
|
|
1923
|
+
`},compactOneToThree:{description:()=>P.default.createElement("h5",null,"Compact 1-to-3"),react:T.code`
|
|
1924
1924
|
function DemoComponent() {
|
|
1925
1925
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
1926
1926
|
term1: "",
|
|
@@ -1973,7 +1973,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1973
1973
|
</SpsForm>
|
|
1974
1974
|
)
|
|
1975
1975
|
}
|
|
1976
|
-
`},compactOneToTwo:{description:()=>
|
|
1976
|
+
`},compactOneToTwo:{description:()=>P.default.createElement("h5",null,"Compact 1-to-2"),react:T.code`
|
|
1977
1977
|
function DemoComponent() {
|
|
1978
1978
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
1979
1979
|
term1: "",
|
|
@@ -2021,7 +2021,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2021
2021
|
</SpsForm>
|
|
2022
2022
|
)
|
|
2023
2023
|
}
|
|
2024
|
-
`},compactOneToOne:{description:()=>
|
|
2024
|
+
`},compactOneToOne:{description:()=>P.default.createElement("h5",null,"Compact 1-to-1"),react:T.code`
|
|
2025
2025
|
function DemoComponent() {
|
|
2026
2026
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
2027
2027
|
term1: "",
|
|
@@ -2273,7 +2273,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2273
2273
|
</SpsTable>
|
|
2274
2274
|
)
|
|
2275
2275
|
}
|
|
2276
|
-
`}}}},pD={checked:"boolean",onChange:"ChangeEventHandler",indeterminate:"boolean",disabled:"boolean",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>"},uD=
|
|
2276
|
+
`}}}},pD={checked:"boolean",onChange:"ChangeEventHandler",indeterminate:"boolean",disabled:"boolean",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>"},uD=G(N({},Y),{checked:y.exports.bool,onChange:ne(),indeterminate:y.exports.bool,options:y.exports.arrayOf(y.exports.oneOfType([y.exports.func,y.exports.any])).isRequired,disabled:y.exports.bool});function bi(e){const u=e,{options:t,className:n,checked:s,onChange:o,indeterminate:i,disabled:c}=u,l=z(u,["options","className","checked","onChange","indeterminate","disabled"]),p=K("sps-checkbox-dropdown",n);return a.createElement("span",N({className:p},l),a.createElement(In,{indeterminate:i,checked:s,disabled:c,onChange:o,inline:!0}),a.createElement(xn,{disabled:c,options:t,icon:_.SpsIcon.CHEVRON_DOWN}))}Object.assign(bi,{props:pD,propTypes:uD,displayName:"SpsCheckboxDropdown"});const mD={kind:"FeedbackBlockKind"},fD=G(N({},Y),{kind:be(_.FeedbackBlockKind)});function vi(e){const p=e,{children:t,className:n,kind:s=_.FeedbackBlockKind.TIP,"data-testid":o,unsafelyReplaceClassName:i}=p,c=z(p,["children","className","kind","data-testid","unsafelyReplaceClassName"]),l=K(i||"sps-feedback-block",`sps-feedback-block--${s}`,n);return a.createElement("div",N({className:l,role:"alert","data-testid":o},c),a.createElement("i",{className:K("sps-icon",`sps-icon-${_.FeedbackBlockIcons[s]}`),"aria-hidden":"true"}),a.createElement("span",{className:"sps-feedback-block__content","data-testid":`${o}__text`},t))}Object.assign(vi,{props:mD,propTypes:fD,displayName:"SpsFeedbackBlock"});const Vu={standard:{label:"Standard Size",description:"Use Standard Size Feedback Blocks for the majority of cases. If a smaller or more subtle solution is needed, use the Micro Size Feedback Block.",examples:{error:{description:"Error",jsx:T.code`
|
|
2277
2277
|
<SpsFeedbackBlock kind={FeedbackBlockKind.ERROR}>
|
|
2278
2278
|
We are experiencing difficulties communicating to the server. Please try again later.
|
|
2279
2279
|
</SpsFeedbackBlock>
|
|
@@ -2318,7 +2318,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2318
2318
|
kind={FeedbackBlockKind.WARNING}
|
|
2319
2319
|
message="This order is missing a shipment date."
|
|
2320
2320
|
/>
|
|
2321
|
-
`}}}},hD={errors:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",legend:"string",optional:"boolean",enabled:"boolean",onToggled:"(isEnabled: boolean) => void",tooltip:"string"},gD=
|
|
2321
|
+
`}}}},hD={errors:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",legend:"string",optional:"boolean",enabled:"boolean",onToggled:"(isEnabled: boolean) => void",tooltip:"string"},gD=G(N({},Y),{errors:dt,formArray:ce(),formGroup:ce(),formMeta:ce(),legend:y.exports.string,optional:y.exports.bool,enabled:y.exports.bool,onToggled:ne(),tooltip:y.exports.string});function yi({children:e,className:t,errors:n,formArray:s,formGroup:o,formMeta:i,legend:c,unsafelyReplaceClassName:l,optional:p=!1,enabled:u=!1,onToggled:f,tooltip:m,"data-testid":g}){const S=o||s,w=a.useRef(null),x=a.useRef(null),[C,D]=a.useState(exports.TooltipVisibility.HIDDEN),[I,v]=a.useState(!1),[k,R]=a.useState(u);Zr(()=>{f==null||f(k)},[k]),a.useEffect(()=>{if(S||i){const L=S&&S.isFocused()||i&&i.isFocused();!I&&L?D(exports.TooltipVisibility.VISIBLE):I&&!L&&D(exports.TooltipVisibility.HIDDEN),v(L)}});const B=K(l||"sps-fieldset",(S&&!S.isPristine()&&S.invalid||i&&(!i.isValid()||!i.contentsAreValid()))&&"sps-fieldset--error",t,p&&!k&&"sps-fieldset--collapsed");function M(){D(C===exports.TooltipVisibility.VISIBLE?exports.TooltipVisibility.HIDDEN:exports.TooltipVisibility.VISIBLE)}return a.createElement("div",{className:"sps-fieldset-container"},a.createElement("fieldset",{className:B,"data-testid":g},a.createElement("legend",{className:"sps-fieldset__legend",ref:w,onMouseEnter:()=>D(exports.TooltipVisibility.VISIBLE),onMouseLeave:()=>D(exports.TooltipVisibility.DELAYED_HIDDEN),onClick:M},p&&a.createElement(In,{checked:k,className:"d-inline-flex",onChange:()=>{R(!k)},"data-testid":`${g}__checkbox`}),c,m&&a.createElement("span",{className:"sps-fieldset__legend-icon",ref:x},a.createElement(Rt,{icon:_.SpsIcon.INFO_CIRCLE,"data-testid":`${g}__info-icon`}))),m&&a.createElement(Dt,{for:x},m),a.createElement(Dt,{for:w,kind:_.TooltipKind.ERROR,showOn:_.TooltipShowTrigger.MANUAL,isShown:C},ft(n)),e))}Object.assign(yi,{props:hD,propTypes:gD,displayName:"SpsFieldset"});const $u={basic:{label:"Basic Fieldsets",description:"info about basic fieldsets",examples:{basic:{react:T.code`
|
|
2322
2322
|
function DemoComponent() {
|
|
2323
2323
|
const RADIO_OPTIONS = [
|
|
2324
2324
|
{ value: "a", label: "Option A" },
|
|
@@ -2554,7 +2554,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2554
2554
|
</SpsForm>
|
|
2555
2555
|
)
|
|
2556
2556
|
}
|
|
2557
|
-
`}}}},SD={},bD=
|
|
2557
|
+
`}}}},SD={},bD=N({},Y);function sr(e){const c=e,{children:t,className:n,unsafelyReplaceClassName:s}=c,o=z(c,["children","className","unsafelyReplaceClassName"]),i=K(s||"sps-list-action-bar-container","z-stratum-bar",n);return a.createElement("div",N({className:i},o),a.createElement("div",{className:"sps-list-action-bar"},a.createElement("div",{className:"sps-list-action-bar__actions"},t)))}Object.assign(sr,{props:SD,propTypes:bD,displayName:"SpsFocusedTaskActions"});const vD={fullWidth:"boolean",isOpen:"boolean",onClose:"() => void"},yD=G(N({},Y),{fullWidth:y.exports.bool,isOpen:y.exports.bool,onClose:ne()});function rr(e){const x=e,{children:t,className:n,fullWidth:s,isOpen:o,onClose:i,title:c,"data-testid":l,unsafelyReplaceClassName:p}=x,u=z(x,["children","className","fullWidth","isOpen","onClose","title","data-testid","unsafelyReplaceClassName"]),f=a.useRef(),{t:m}=a.useContext(Oe);a.useEffect(()=>{document.body.style.overflow=o?"hidden":null},[o]),a.useEffect(()=>()=>{document.body.style.overflow=null},[]);const g=K(p||"sps-focused-task","z-stratum-dialog",s&&"sps-focused-task--full-width",o&&"sps-focused-task--open",n),[S,w]=Vt(t,[{type:sr}]);return a.createElement("div",N({className:g,ref:f,"data-testid":l},u),a.createElement("div",{className:"sps-focused-task__title"},a.createElement(Fe,{className:"sps-focused-task__close-btn",kind:_.ButtonKind.ICON,icon:_.SpsIcon.X,onClick:i,title:m("design-system:focusedTask.close")})),a.createElement("div",{className:"sps-focused-task__body"},a.createElement(Mt.Provider,{value:{parentElementRef:f}},o&&w)),S)}Object.assign(rr,{props:vD,propTypes:yD,displayName:"SpsFocusedTask"});const Hu={basic:{examples:{basic:{react:T.code`
|
|
2558
2558
|
function SpsFocusedTaskBasic() {
|
|
2559
2559
|
const [showFocusedTask, setShowFocusedTask] = React.useState(false);
|
|
2560
2560
|
|
|
@@ -2630,7 +2630,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2630
2630
|
</>
|
|
2631
2631
|
);
|
|
2632
2632
|
}
|
|
2633
|
-
`}}}};function Ti(e,t){const[n,...s]=T.crumblePath(t);return s.length?e.members[n].get(s):e.members[n]}function TD(e=[],t={}){return
|
|
2633
|
+
`}}}};function Ti(e,t){const[n,...s]=T.crumblePath(t);return s.length?e.members[n].get(s):e.members[n]}function TD(e=[],t={}){return G(N({validators:[]},t),{_type:"Array",members:[...e],errors:null,invalid:!1,isValid(){const n=this;return!n.invalid&&n.members.every(s=>s.isValid())},isRequired(){const n=this;return n.validators&&n.validators.indexOf(is.required)>-1},hasError(n){const s=this;return s.errors&&Object.prototype.hasOwnProperty.call(s.errors,n)},length:e.length,setInitValue(n){for(const[s,o]of this.members.entries())o.setInitValue(n[s]);return this},getValue(){return this.members.map(n=>n.getValue())},setValue(n=[]){for(const[s,o]of this.members.entries())o.setValue(n[s]);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 s=this;s.members=[...e],s.length=e.length;for(const[o,i]of s.members.entries())n&&o<n.length?i.reset(n[o]):i.reset();return s.update(),this},get(n){return Ti(this,n)},at(n){return this.members[n]},push(n){const s=this;return s.members.push(n),s.length=s.members.length,s.update(),this},insert(n,s){const o=this;return o.members.splice(n,null,s),o.length=o.members.length,o.update(),this},removeAt(n){const s=this;return s.members.splice(n,1),s.length=s.members.length,s.update(),this},setControl(n,s){const o=this;return o.members[n]=s,o.update(),this}})}function wD(e,t={}){return G(N({validators:[],id:sn()},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(is.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 ED(e={},t={}){return G(N({validators:[]},t),{_type:"Group",members:N({},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 s of Object.keys(this.members))this.members[s].setInitValue(n[s]);return this},getValue(){return Object.keys(this.members).reduce((n,s)=>Object.assign(n,{[s]:this.members[s].getValue()}),{})},setValue(n={}){for(const s of Object.keys(this.members))this.members[s].setValue(n[s]);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=N({},e);for(const s of Object.keys(this.members))n&&Object.prototype.hasOwnProperty.call(n,s)?this.members[s].reset(n[s]):this.members[s].reset();return this.update(),this},get(n){return Ti(this,n)},addControl(n,s){if(this.contains(n))throw new Error(`Form group already contains a control called "${n}".`);return this.members[n]=s,this.update(),this},removeControl(n){return delete this.members[n],this.update(),this},setControl(n,s){return this.members[n]=s,this.update(),this},contains(n){return Object.keys(this.members).indexOf(n)>-1}})}function CD(e,t){t&&e.setInitValue(t);const[n,s]=H.useState(),[o,i]=H.useState([]),[c,l]=H.useReducer(p=>{for(const u of o)for(const f of T.traversePath(p,u))f.validators&&f.validators.length&&(f.errors=va(f.getValue(),f.validators),f.invalid=!!f.errors&&!f.pristine);return s(null),i([]),N({},p)},e);return T.forEachNestedObject(c,(p,u)=>{u._type&&(u.update=function(){return o.push(p),i(o),n||s(window.setTimeout(l,0)),this})}),c}function xD(e,t=null){const[n,s]=H.useState(t),o=H.useRef(()=>null);return H.useEffect(()=>{const i=()=>n,c=e.validators.indexOf(o.current);c===-1?e.validators.push(i):e.validators[c]=i,e.update(),o.current=i},[n]),[n,s]}exports.ValidationMode=void 0;(function(e){e[e.ON_CHANGE=0]="ON_CHANGE",e[e.ON_BLUR=1]="ON_BLUR",e[e.ON_SUBMIT=2]="ON_SUBMIT"})(exports.ValidationMode||(exports.ValidationMode={}));function DD(e,t={},n=[]){for(const[s,o]of Object.entries(t))o===0?cc(s):o===2&&dc(s);return a.useCallback(e,n)}const Wu={},ID={ideal:{label:"Ideal",examples:{ideal:{react:T.code`
|
|
2634
2634
|
function DemoComponent() {
|
|
2635
2635
|
const initValue = {
|
|
2636
2636
|
names: ["Foo"],
|
|
@@ -2761,7 +2761,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2761
2761
|
</>
|
|
2762
2762
|
)
|
|
2763
2763
|
}
|
|
2764
|
-
`}}}},ND={imgSrc:"string",kind:"GrowlerKind",onClose:"() => void",persist:"boolean",title:"string"},kD=
|
|
2764
|
+
`}}}},ND={imgSrc:"string",kind:"GrowlerKind",onClose:"() => void",persist:"boolean",title:"string"},kD=G(N({},Y),{imgSrc:y.exports.string,kind:be(_.GrowlerKind),onClose:ne(),persist:y.exports.bool,title:y.exports.string});function or(e){const F=e,{children:t,className:n,imgSrc:s,kind:o=_.GrowlerKind.INFO,onClose:i,persist:c,title:l,unsafelyReplaceClassName:p}=F,u=z(F,["children","className","imgSrc","kind","onClose","persist","title","unsafelyReplaceClassName"]),f=a.useRef(i);a.useEffect(()=>{f.current=i},[i]);const{t:m}=a.useContext(Oe),[g,S]=a.useState(!0),[w,x]=a.useState(!1);function C(){return[window.setTimeout(()=>x(!0),_.GROWLER_VISIBLE_DURATION_MS),window.setTimeout(()=>{S(!1),f.current&&f.current()},_.GROWLER_VISIBLE_DURATION_MS+_.GROWLER_FADEOUT_DURATION_MS)]}const D=a.useRef([]);function I(){c||(D.current=C())}function v(){for(const A of D.current)window.clearTimeout(A);D.current=[]}function k(){v(),S(!0),x(!1)}function R(){k(),x(!1),S(!1),i&&i()}const B=o===_.GrowlerKind.PROGRESS?"sps-spinner":K("sps-icon",`sps-icon-${_.GrowlerIcon.get(o)}`),M=K(p||"sps-growler",g&&"show",w&&"fade",`sps-growler--${o}`,n);return a.useEffect(()=>(I(),()=>{v()}),[]),zn("sps-growler-display-area",["sps-growler-area","z-stratum-growlers"])(a.createElement("div",N({role:"alert",className:M,onMouseEnter:k,onMouseLeave:I},u),a.createElement("div",{className:"sps-growler__icon-box"},s&&a.createElement("img",{src:s,alt:""}),!s&&a.createElement("i",{className:B,"aria-hidden":"true"})),a.createElement("div",{className:"sps-growler__message-box"},a.createElement("div",{className:"sps-growler__message-box-text"},l&&a.createElement("span",{className:"sps-growler__message-box-title d-block"},l),a.createElement("div",{className:"sps-growler__message-box-subtitle"},t)),a.createElement("button",{type:"button",className:"sps-growler__close-button","aria-hidden":"true",onClick:R},a.createElement("i",{className:"sps-icon sps-icon-x",title:m("design-system:growler.dismiss")})))))}Object.assign(or,{props:ND,propTypes:kD,displayName:"SpsGrowler"});const Gu={writingGuidelines:{label:"Writing Guidelines",customSection:()=>a.createElement(a.Fragment,null,a.createElement("p",null,"Use the following guidelines to write an effective Growler message."),a.createElement("ul",null,a.createElement("li",null,"Write all messages in sentence case.",a.createElement("ul",null,a.createElement("li",null,"Capitalize the first word of the message."),a.createElement("li",null,"Add punctuation, such as a period, at the end of the message."))),a.createElement("li",null,"Keep messages as succinct as possible while also providing sufficient information to the customer."),a.createElement("li",null,"If you can clearly convey your message in a single statement, use only the Primary Message."),a.createElement("li",null,"If the message requires additional details, such as further information or instructions, use both the Primary and Secondary Messages.")),a.createElement("p",null,"For more examples of effective feedback message writing, refer to"," ",a.createElement("a",{href:"https://atlassian.design/content/messaging-guidelines",target:"_blank",rel:"noreferrer"},"Atlassian's Messaging Guidelines"),"."))},error:{label:"Error",description:()=>a.createElement(a.Fragment,null,a.createElement("p",null,"Acceptable message: Document ABC123 has not been sent. Check the form and try sending it again."),a.createElement("p",null,`Unacceptable message: Can't send your document."`)),examples:{primary:{description:"Primary Message Only",react:T.code`
|
|
2765
2765
|
import { SpsButton, SpsGrowler } from "@spscommerce/ds-react";
|
|
2766
2766
|
import { ButtonKind, GrowlerKind } from "@spscommerce/ds-shared";
|
|
2767
2767
|
|
|
@@ -3049,7 +3049,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3049
3049
|
</>
|
|
3050
3050
|
);
|
|
3051
3051
|
}
|
|
3052
|
-
`}}}},MD={disabled:"boolean",min:"number",max:"number",step:"number",onValueChange:"(newValue: number) => void"},_D=
|
|
3052
|
+
`}}}},MD={disabled:"boolean",min:"number",max:"number",step:"number",onValueChange:"(newValue: number) => void"},_D=N({disabled:y.exports.bool,min:y.exports.number,max:y.exports.number,step:y.exports.number,onValueChange:ne()},Y);function wi(e){const I=e,{disabled:t,min:n,max:s,step:o=1,onValueChange:i,unsafelyReplaceClassName:c,className:l,"data-testid":p}=I,u=z(I,["disabled","min","max","step","onValueChange","unsafelyReplaceClassName","className","data-testid"]),[f,m]=a.useState(n||0),[g,S]=a.useState(!1);a.useEffect(()=>{i&&typeof i=="function"&&i(f),n&&f>=n||s&&f<=s?g&&S(!1):(n||s)&&S(!0)},[f]);const w=()=>f<=n?!1:(f>s?m(s):m(v=>v-o),!0),x=()=>f>=s?!1:(f<n?m(n):m(v=>v+o),!0),C=v=>{v.target.value!==""&&m(parseInt(v.target.value,10))},D=c||K("sps-incrementor sps-input-group sps-input-group__append",l);return a.createElement("div",G(N({className:D},u),{"data-testid":p}),a.createElement("div",{className:"sps-button sps-button--icon"},a.createElement("button",{type:"button","data-testid":`${p}__minus`,onClick:w,disabled:t,"aria-label":`Subtract ${o}`},a.createElement("i",{className:"sps-icon sps-icon-minus","aria-hidden":"true"}))),a.createElement("div",{className:"sps-text-input"},a.createElement("input",{type:"text",className:K("sps-form-control",g&&"sps-input--error"),value:f,onChange:C,disabled:t,"data-testid":`${p}__input`})),a.createElement("div",{className:"sps-button sps-button--icon"},a.createElement("button",{type:"button","data-testid":`${p}__plus`,onClick:x,disabled:t,"aria-label":`Add ${o}`},a.createElement("i",{className:"sps-icon sps-icon-plus-sign","aria-hidden":"true"}))))}Object.assign(wi,{props:MD,propTypes:_D,displayName:"SpsIncrementor"});const Uu={stepExample:{label:"Incrementor",description:"info about incrementor",examples:{stacked:{react:T.code`
|
|
3053
3053
|
function Component () {
|
|
3054
3054
|
const [value, setValue] = React.useState("");
|
|
3055
3055
|
const handleChange = val => {
|
|
@@ -3068,7 +3068,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3068
3068
|
</React.Fragment>
|
|
3069
3069
|
);
|
|
3070
3070
|
}
|
|
3071
|
-
`}}}};function Yu(e){const{children:t}=e;return a.createElement("div",{className:"insight-tile-wrapper"},t)}const RD={horizontal:"boolean",icon:"SpsIcon",kind:"SpsInsightTileKind",title:"string",metric:"number | string",partnerCount:"number",totalPartners:"number"},LD=
|
|
3071
|
+
`}}}};function Yu(e){const{children:t}=e;return a.createElement("div",{className:"insight-tile-wrapper"},t)}const RD={horizontal:"boolean",icon:"SpsIcon",kind:"SpsInsightTileKind",title:"string",metric:"number | string",partnerCount:"number",totalPartners:"number"},LD=G(N({},Y),{horizontal:y.exports.bool,icon:be(_.SpsIcon),kind:be(_.SpsInsightTileKind),title:y.exports.string,metric:y.exports.number||y.exports.string,partnerCount:y.exports.number,totalPartners:y.exports.number});function Ei(e){const D=e,{children:t,className:n,horizontal:s=!1,icon:o,kind:i="general",title:c,metric:l,partnerCount:p,totalPartners:u,unsafelyReplaceClassName:f}=D,m=z(D,["children","className","horizontal","icon","kind","title","metric","partnerCount","totalPartners","unsafelyReplaceClassName"]),g=K(f||"sps-insight-tile",`sps-insight-tile--${i}`,n,s&&"sps-insight-tile--horizontal",t&&"sps-insight-tile--has-detail"),{t:S}=a.useContext(Oe),[w,x,C]=(p?S("design-system:insightTile.partnerCount",{count:p,total:u}):"").split("|");return a.createElement(a.Fragment,null,a.createElement("div",N({className:g},m),a.createElement("div",{className:"sps-insight-tile__body"},o?a.createElement("i",{className:`sps-icon sps-icon-${o}`}):a.createElement("i",{className:`sps-icon sps-icon-${_.SpsInsightTileIcons[i]}`}),l&&a.createElement("div",{className:"sps-insight-tile__metric-count"},l),c&&a.createElement("div",{className:"sps-insight-tile__description"},a.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"}},c),a.createElement("div",{className:"sps-insight-tile__detail"},t))),p&&a.createElement("div",{className:"sps-insight-tile__partner-count"},p===u?a.createElement("div",null,S("design-system:insightTile.all")):a.createElement(a.Fragment,null,a.createElement("div",null,w),a.createElement("div",null,x),a.createElement("div",null,C)),a.createElement("div",{className:"sps-insight-tile__partners-text"},S("design-system:insightTile.partners")))))}Object.assign(Ei,{props:RD,propTypes:LD,displayName:"SpsInsightTile"});const OD={basic:{label:"Basic Insight Tiles",examples:{basic:{jsx:T.code`
|
|
3072
3072
|
<SpsInsights>
|
|
3073
3073
|
<SpsInsightTile
|
|
3074
3074
|
kind={SpsInsightTileKind.GENERAL}
|
|
@@ -3289,7 +3289,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3289
3289
|
<span className="gray600 font-weight-bold">Detail:</span> 792 units
|
|
3290
3290
|
</SpsInsightTile>
|
|
3291
3291
|
</SpsInsights>
|
|
3292
|
-
`}}}},BD={inline:"boolean"},AD=
|
|
3292
|
+
`}}}},BD={inline:"boolean"},AD=G(N({},Y),{inline:y.exports.bool});function Ci(e){const p=e,{children:t,className:n,inline:s,"data-testid":o,unsafelyReplaceClassName:i}=p,c=z(p,["children","className","inline","data-testid","unsafelyReplaceClassName"]),l=K(i||"sps-key-value-list",s&&"sps-key-value-list--inline",n);return a.createElement("div",N({className:l,"data-testid":`${o}`},c),t)}Object.assign(Ci,{props:BD,propTypes:AD,displayName:"SpsKeyValueList"});const PD={itemKey:{type:"string | nodeOrRenderFn",required:!0},titleColor:"KeyValueListTitleColor"},FD=G(N({},Y),{itemKey:y.exports.string.isRequired||dt.isRequired,titleColor:be(_.KeyValueListTitleColor)});function xi(e){const u=e,{children:t,className:n,itemKey:s,titleColor:o=_.KeyValueListTitleColor.LIGHT,"data-testid":i,unsafelyReplaceClassName:c}=u,l=z(u,["children","className","itemKey","titleColor","data-testid","unsafelyReplaceClassName"]),p=K(c||"sps-key-value-list__item",`sps-key-value-list__item--${o}`,n);return a.createElement("div",N({className:p,"data-testid":`${i}`},l),a.createElement("span",{className:"sps-key-value-list__key","data-testid":`${i}__key`},s),a.createElement("span",{className:"sps-key-value-list__value","data-testid":`${i}__value`},t))}Object.assign(xi,{props:PD,propTypes:FD,displayName:"SpsKeyValueListItem"});const zu={vertical:{label:"Vertical Key Value Lists",description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h5",null,"Use:"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"Vertical containers such as a side bar or general card")),P.default.createElement("h5",null,"Do Not Use:"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"In Table cells or Description Lists")),P.default.createElement("h5",null,"Usage Rules"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"Titles must be written in Title Case"),P.default.createElement("li",{className:"mb-2"},"Values can be written in Sentence Case or Title Case as best suits the content"),P.default.createElement("li",{className:"mb-2"},"Titles or Values can include hyperlinks and/or icons",P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"Icons should always appear on the left before any text content"))),P.default.createElement("li",{className:"mb-2"},"Values can include tags"),P.default.createElement("li",{className:"mb-2"},"Can include multiple values on additional lines"))),examples:{standard:{description:()=>P.default.createElement("h4",null,"Standard"),react:T.code`
|
|
3293
3293
|
function DemoComponent() {
|
|
3294
3294
|
return (
|
|
3295
3295
|
<SpsKeyValueList>
|
|
@@ -3299,7 +3299,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3299
3299
|
</SpsKeyValueList>
|
|
3300
3300
|
)
|
|
3301
3301
|
}
|
|
3302
|
-
`},multipleValues:{description:()=>
|
|
3302
|
+
`},multipleValues:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Multiple Values"),P.default.createElement("p",null,P.default.createElement("b",null,"Note:")," There is no limit to the number of values that can be listed, but extensive lists should be avoided.")),react:T.code`
|
|
3303
3303
|
function DemoComponent() {
|
|
3304
3304
|
return (
|
|
3305
3305
|
<SpsKeyValueList>
|
|
@@ -3311,7 +3311,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3311
3311
|
</SpsKeyValueList>
|
|
3312
3312
|
)
|
|
3313
3313
|
}
|
|
3314
|
-
`},secondaryValues:{description:()=>
|
|
3314
|
+
`},secondaryValues:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h5",null,"Secondary Values"),P.default.createElement("p",null,P.default.createElement("b",null,"Note:")," When using a secondary value (styled in lighter grey text) the number of values listed should be limited to two (2).")),react:T.code`
|
|
3315
3315
|
function DemoComponent() {
|
|
3316
3316
|
return (
|
|
3317
3317
|
<SpsKeyValueList>
|
|
@@ -3322,7 +3322,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3322
3322
|
</SpsKeyValueList>
|
|
3323
3323
|
)
|
|
3324
3324
|
}
|
|
3325
|
-
`},tags:{description:({NavigateTo:e})=>
|
|
3325
|
+
`},tags:{description:({NavigateTo:e})=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Tags"),P.default.createElement("p",null,P.default.createElement("b",null,"Note:")," Tags can appear inline or on individual lines as the length of content requires. Reference the ",P.default.createElement(e,{to:"tags"},"Tag")," component for spacing rules.")),react:T.code`
|
|
3326
3326
|
function DemoComponent() {
|
|
3327
3327
|
return (
|
|
3328
3328
|
<SpsKeyValueList>
|
|
@@ -3333,7 +3333,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3333
3333
|
</SpsKeyValueList>
|
|
3334
3334
|
)
|
|
3335
3335
|
}
|
|
3336
|
-
`},hyperlinksAndIcons:{description:()=>
|
|
3336
|
+
`},hyperlinksAndIcons:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Hyperlinks & Icons"),P.default.createElement("p",null,P.default.createElement("b",null,"Note:")," Icons and Hyperlinks can be used independently of one another.")),react:T.code`
|
|
3337
3337
|
function DemoComponent() {
|
|
3338
3338
|
return (
|
|
3339
3339
|
<SpsKeyValueList>
|
|
@@ -3344,7 +3344,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3344
3344
|
</SpsKeyValueList>
|
|
3345
3345
|
)
|
|
3346
3346
|
}
|
|
3347
|
-
`}}},horizontal:{label:"Horizontal Key Value Lists",description:()=>
|
|
3347
|
+
`}}},horizontal:{label:"Horizontal Key Value Lists",description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h5",null,"Use:"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"Horizontal containers such as a content row")),P.default.createElement("h5",null,"Do Not Use:"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"In Table cells or Description Lists")),P.default.createElement("h5",null,"Usage Rules"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"Titles must be written in Title Case"),P.default.createElement("li",{className:"mb-2"},"Values can be written in Sentence Case or Title Case as best suits the content"),P.default.createElement("li",{className:"mb-2"},"Titles or Values can include hyperlinks and/or icons",P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"Icons should always appear on the left before any text content"))),P.default.createElement("li",{className:"mb-2"},"Can be used individually or stacked on top of one another",P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"When stacking, the value lists should share a common category or theme"))))),examples:{standard:{description:()=>P.default.createElement("h4",null,"Standard"),react:T.code`
|
|
3348
3348
|
function DemoComponent() {
|
|
3349
3349
|
return (
|
|
3350
3350
|
<SpsKeyValueList inline>
|
|
@@ -3354,7 +3354,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3354
3354
|
</SpsKeyValueList>
|
|
3355
3355
|
)
|
|
3356
3356
|
}
|
|
3357
|
-
`},stacked:{description:()=>
|
|
3357
|
+
`},stacked:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Stacked"),P.default.createElement("p",null,P.default.createElement("b",null,"Note:")," There is no limit to the number of stacked listings, but more than three in a single container should be avoided."),P.default.createElement("p",null,P.default.createElement("b",null,"Note:")," Titles are right-aligned in the horizontal Key Value Lists to optimize scanability of the values.")),react:T.code`
|
|
3358
3358
|
function DemoComponent() {
|
|
3359
3359
|
return (
|
|
3360
3360
|
<div className="sfg-row">
|
|
@@ -3374,7 +3374,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3374
3374
|
</div>
|
|
3375
3375
|
)
|
|
3376
3376
|
}
|
|
3377
|
-
`},withLinks:{description:()=>
|
|
3377
|
+
`},withLinks:{description:()=>P.default.createElement("h4",null,"With Links"),react:T.code`
|
|
3378
3378
|
function DemoComponent() {
|
|
3379
3379
|
return (
|
|
3380
3380
|
<div className="sfg-row">
|
|
@@ -3394,7 +3394,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3394
3394
|
</div>
|
|
3395
3395
|
)
|
|
3396
3396
|
}
|
|
3397
|
-
`}}}},KD={for:{type:"SpsFormMetaBase<any>",required:!0},description:"string",stronglySuggested:"boolean",help:"ReactNodeOrRenderFn",helpIcon:"SpsIcon",helpIconColor:"string",errors:"ReactNodeOrRenderFn"},VD=
|
|
3397
|
+
`}}}},KD={for:{type:"SpsFormMetaBase<any>",required:!0},description:"string",stronglySuggested:"boolean",help:"ReactNodeOrRenderFn",helpIcon:"SpsIcon",helpIconColor:"string",errors:"ReactNodeOrRenderFn"},VD=G(N({},Y),{description:y.exports.string,for:y.exports.oneOfType([ce(),ce()]).isRequired,stronglySuggested:y.exports.bool,help:dt,helpIcon:be(_.SpsIcon),helpIconColor:y.exports.string,errors:dt});function Di(g){var S=g,{children:e,className:t,description:n,for:s,stronglySuggested:o,help:i,helpIcon:c=_.SpsIcon.QUESTION_CIRCLE,helpIconColor:l="blue200",errors:p,unsafelyReplaceClassName:u,"data-testid":f}=S,m=z(S,["children","className","description","for","stronglySuggested","help","helpIcon","helpIconColor","errors","unsafelyReplaceClassName","data-testid"]);const{t:w}=a.useContext(Oe),x=a.useRef(),C=a.useRef(),D=a.useRef(),I=a.useRef(),[v,k]=a.useState(exports.TooltipVisibility.HIDDEN),[R,B]=a.useState(exports.TooltipVisibility.HIDDEN),[M,L]=a.useState(exports.TooltipVisibility.HIDDEN),[F,A]=a.useState(exports.TooltipVisibility.HIDDEN);function $(){k(exports.TooltipVisibility.HIDDEN),B(exports.TooltipVisibility.HIDDEN),L(exports.TooltipVisibility.HIDDEN),A(exports.TooltipVisibility.HIDDEN)}function V(){k(exports.TooltipVisibility.DELAYED_HIDDEN),B(exports.TooltipVisibility.DELAYED_HIDDEN),L(exports.TooltipVisibility.DELAYED_HIDDEN)}function W(X){X.preventDefault(),$(),L(nr(M))}function pe(){return s&&(s instanceof wn&&s.isVisibilyInvalid()||!(s instanceof wn)&&!s.isValid())?[R,B]:s&&s instanceof wn&&s.hasPreventativeErrors()?[F,A]:i?[v,k]:o?[M,L]:[exports.TooltipVisibility.HIDDEN,()=>{}]}function me(){$();const[X,le]=pe();le(nr(X))}function re(){$();const[,X]=pe();X(exports.TooltipVisibility.VISIBLE)}function se(X){X.preventDefault(),$(),k(nr(v))}a.useEffect(()=>{s&&(s.onFocus=re,s.onBlur=$)},[s]);const j=K(u||"sps-form-group__label",t),[Z,oe]=s instanceof wn?[s,void 0]:[void 0,s];function ee(){if(Z){for(const X of["dateFormat","dateRangeOrder","dateValidity","required"])if(Z.hasError(X))return w(`design-system:label.errors.${X}`,{context:Z.errors[X]});if(Z.hasError("dateConstraint")){const le=Z.errors.dateConstraint.minExceeded?"min":"max";return w(`design-system:label.errors.dateConstraint.${le}`,{context:Z.errors.dateConstraint})}}return null}function te(){if(Z){for(const X of Xt)if(Z.hasPreventativeError(X))return w(`design-system:label.preventativeErrors.${X}`)}return null}return a.useEffect(()=>{(Z==null?void 0:Z.hasPreventativeErrors())&&A(exports.TooltipVisibility.VISIBLE)},[Z==null?void 0:Z.hasPreventativeErrors()]),a.createElement(it,{formMeta:Z,formControl:oe},a.createElement("label",N({htmlFor:s&&"id"in s?s.id:void 0,className:j,"data-testid":f},m),a.createElement("i",{ref:C,"data-testid":`${f}__suggested-icon`,className:K("sps-icon","sps-icon-exclamation-triangle","orange200","sps-form-group__label-suggested-icon",!o&&"d-none"),onClick:W,onMouseLeave:V}),a.createElement("i",{ref:x,"data-testid":`${f}__error-icon`,className:K("sps-icon","sps-icon-exclamation-circle","sps-form-group__label--error-icon"),onClick:me,onMouseLeave:V}),a.createElement("span",{ref:I,className:"sps-form-group__label-content"},e),a.createElement("i",{ref:D,"data-testid":`${f}__help-icon`,className:K("sps-icon",`sps-icon-${c}`,l,!i&&"d-none"),onClick:se,onMouseLeave:V})),a.createElement(Dt,{kind:_.TooltipKind.DEFAULT,for:D,showOn:_.TooltipShowTrigger.MANUAL,isShown:v,altPosition:_.Position.TOP_MIDDLE},ft(i)),a.createElement(Dt,{kind:_.TooltipKind.ERROR,for:x,showOn:_.TooltipShowTrigger.MANUAL,isShown:R,altPosition:_.Position.LEFT_MIDDLE},ft(p)||ee()),(Z==null?void 0:Z.hasPreventativeErrors())&&a.createElement(Dt,{kind:_.TooltipKind.WARNING,for:I,showOn:_.TooltipShowTrigger.MANUAL,isShown:F,altPosition:_.Position.LEFT_MIDDLE},ft(p)||te()),a.createElement(Dt,{kind:_.TooltipKind.DEFAULT,for:C,position:_.Position.TOP_LEFT,altPosition:_.Position.TOP_LEFT,offsets:[13,20],showOn:_.TooltipShowTrigger.MANUAL,isShown:M},w("design-system:label.stronglySuggested")),n&&a.createElement("div",{className:"sps-form-control__description","data-testid":`${f}__description`},n))}Object.assign(Di,{props:KD,propTypes:VD,displayName:"SpsLabel"});const ju={general:{label:"General Usage",description:()=>a.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:T.code`
|
|
3398
3398
|
function DemoComponent() {
|
|
3399
3399
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
3400
3400
|
companyName: ""
|
|
@@ -3515,11 +3515,11 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3515
3515
|
></SpsTextInput>
|
|
3516
3516
|
</>;
|
|
3517
3517
|
}
|
|
3518
|
-
`}}}},$D={clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"string | number",required:!0}},HD=
|
|
3518
|
+
`}}}},$D={clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"string | number",required:!0}},HD=G(N({},Y),{clearSelected:ne().isRequired,itemsSelected:y.exports.oneOfType([y.exports.string,y.exports.number])});function Ii(e){const m=e,{itemsSelected:t,clearSelected:n,children:s,className:o,"data-testid":i,unsafelyReplaceClassName:c}=m,l=z(m,["itemsSelected","clearSelected","children","className","data-testid","unsafelyReplaceClassName"]),{t:p}=a.useContext(Oe),u=()=>{typeof n=="function"&&n()},f=K(c||"sps-list-action-bar-container","z-stratum-actionbar",o);return!!t&&a.createElement("div",G(N({className:f},l),{"data-testid":i}),a.createElement("div",{className:"sps-list-action-bar"},a.createElement("div",{className:"sps-list-action-bar__details"},a.createElement("span",{className:"sps-tag sps-tag--info","data-testid":`${i}__badge`},t),p("design-system:listActionBar.itemsSelected")),a.createElement("div",{className:"sps-list-action-bar__actions"},a.createElement(Mt.Provider,{value:{fixed:!0}},s)),a.createElement("div",{className:"sps-list-action-bar__clear"},a.createElement(Fe,{kind:_.ButtonKind.LINK,icon:_.SpsIcon.X,onClick:u,"data-testid":`${i}__clear-button`},p("design-system:listActionBar.clearSelected")))))}Object.assign(Ii,{props:$D,propTypes:HD,displayName:"SpsListActionBar"});const Ni=a.createContext({resizeable:!1,resizeState:{},setResizeState:()=>{},setSingleResizeState:()=>{},sort:[],setSort:()=>{}}),WD=({children:e,resizeable:t=!1,resizeState:n,onResizeStateChange:s,sort:o,onSortChange:i})=>{const[c,l]=a.useState(n||{}),[p,u]=a.useState(o||[]),f=a.useRef(i);f.current=i;const m=a.useRef(s);m.current=s;const g=a.useCallback(C=>{var D;u(C),(D=f.current)==null||D.call(f,C)},[]),S=a.useCallback(C=>{var D;l(C),(D=m.current)==null||D.call(m,C)},[]),w=a.useCallback((C,D)=>{l(I=>{var k;const v=G(N({},I),{[C]:D});return(k=m.current)==null||k.call(m,v),v})},[]),x=a.useMemo(()=>({resizeable:t,resizeState:c,setResizeState:S,setSingleResizeState:w,sort:p,setSort:g}),[t,c,S,w,p,g]);return a.createElement(Ni.Provider,{value:x},e)},GD=e=>{const t=/(auto|scroll)/,n=(l,p)=>l.parentNode===null?p:n(l.parentNode,p.concat([l])),s=(l,p)=>getComputedStyle(l,null).getPropertyValue(p),o=l=>s(l,"overflow")+s(l,"overflow-y"),i=l=>t.test(o(l));return(l=>{if(!(l instanceof HTMLElement||l instanceof SVGElement))return;const p=n(l.parentNode,[]);for(let u=0;u<p.length;u+=1)if(i(p[u]))return p[u];return null})(e)},qu=(e,t)=>{a.useLayoutEffect(()=>{if(e&&t.current){let n=0,s=!0,o=t.current.previousElementSibling;for(;o!==null;){if(!o.classList.contains("sps-table__cell--pinned")){s=!1;break}o=o.previousElementSibling}if(s){for(o=t.current.previousElementSibling;o!==null;)n+=o.clientWidth,o=o.previousElementSibling;t.current.style.left=`${n}px`}else{let i=t.current.nextElementSibling;for(;i!==null;)n+=i.clientWidth,i=i.nextElementSibling;t.current.style.right=`${n}px`}}})},UD=e=>{a.useLayoutEffect(()=>{const t=()=>{if(!e.current)return;const n=e.current.querySelectorAll("table > thead > tr:first-child > .sps-table__cell--pinned"),s=e.current.offsetWidth-e.current.clientWidth,o=e.current.offsetHeight-e.current.clientHeight;if(n.length>0){const i=[],c=[];n.forEach(u=>{let f=!0,m=u.previousElementSibling;for(;m!==null;){if(!m.classList.contains("sps-table__cell--pinned")){f=!1;break}m=m.previousElementSibling}f?i.push(u):c.push(u)});const l=i.reduce((u,f)=>u+f.clientWidth,0),p=c.reduce((u,f)=>u+f.clientWidth,0);e.current.style.backgroundPosition=`${l}px 0,
|
|
3519
3519
|
calc(100% - ${p}px) 0,
|
|
3520
3520
|
${l}px ${-o}px,
|
|
3521
3521
|
calc(100% - ${p+s}px) ${-o}px`}else e.current.style.backgroundPosition=`0 0, 100% 0, 0 ${-o}px,
|
|
3522
|
-
calc(100% - ${s}px) ${-o}px`};return e.current&&(t(),e.current.addEventListener("scroll",t),window.addEventListener("scroll",t)),()=>{e.current&&e.current.removeEventListener("scroll",t),window.removeEventListener("scroll",t)}})},YD=(e,t)=>{a.useLayoutEffect(()=>{const n=e.current,s=n==null?void 0:n.querySelector("thead"),o=n==null?void 0:n.querySelector("table"),i=o==null?void 0:o.querySelector("tbody>tr"),c=i==null?void 0:i.querySelectorAll("td"),l=s==null?void 0:s.querySelectorAll("th"),p=document.body.querySelector(".sps-navbar-container");let u=n==null?void 0:n.querySelector(".placeholder-head"),f=null;const m=()=>{s&&(s.style.position=t?"sticky":null,s.style.top=t?"0":null,s.style.overflow=null,s.style.maxWidth=null,s.style.width=null,s.style.minWidth=null),u&&(u.style.width=null,u.style.height=null),c&&Array.from(c).forEach((x,E)=>{l[E].style.minWidth=null,l[E].style.width=null,l[E].style.maxWidth=null,x.style.minWidth=null,x.style.width=null,x.style.maxWidth=null})},g=()=>{s.scrollLeft=n.scrollLeft},S=()=>{let x=null;f===window?x=p?p.getBoundingClientRect().height:0:f instanceof HTMLElement&&(x=f.getBoundingClientRect().top);const E=n.scrollLeft,D=s.getBoundingClientRect(),I=n.getBoundingClientRect();if(D.top<=x&&x<=I.bottom-D.height&&I.top<=x){s.style.position="fixed",s.style.top=`${x}px`,s.style.overflow="hidden";const v=e.current.offsetWidth-e.current.clientWidth,N=`${I.width-v}px`;s.style.maxWidth=N,s.style.width=N,s.style.minWidth=N,c&&Array.from(c).forEach((_,O)=>{const R=_.getBoundingClientRect().width,B=l[O].getBoundingClientRect().width,F=`${Math.max(R,B)}px`;l[O].style.minWidth=F,l[O].style.width=F,l[O].style.maxWidth=F,_.style.minWidth=F,_.style.width=F,_.style.maxWidth=F}),u||(u=document.createElement("div"),u.style.width=`${D.width}px`,u.style.height=`${D.height}px`,u.className="placeholder-head",n.insertBefore(u,o))}else u&&(n.removeChild(u),u=null,m());n.scrollLeft=E,g()},w=()=>{m(),S(),g()};return s&&s.classList.contains("sps-table__head--pinned")&&(f=GD(n)||window,f.addEventListener("scroll",S),window.addEventListener("resize",w),n.addEventListener("scroll",g),w()),()=>{f&&(f.removeEventListener("scroll",S),window.removeEventListener("resize",w)),n&&n.removeEventListener("scroll",g)}})},zD=(e,t)=>{const n=()=>{const s=e.current,o=s==null?void 0:s.querySelector("table > thead"),i=s==null?void 0:s.querySelector("table"),c=s==null?void 0:s.querySelector(".shadow--top"),l=s==null?void 0:s.querySelector(".shadow--bottom");if(o&&i&&c&&l){l.style.left="0",l.style.bottom="0",c.style.left="0";const p=s.offsetHeight-(s==null?void 0:s.clientHeight),u=i.getBoundingClientRect().height,f=o.getBoundingClientRect().height,m=s.scrollTop,g=u+p-s.getBoundingClientRect().height-s.scrollTop,S=s.scrollLeft;l.style.bottom=`${-m}px`,l.style.left=`${S}px`,l.style.opacity=g>0?"1":"0",c.style.top=`${m+f}px`,c.style.left=`${S}px`,c.style.opacity=m>0?"1":"0"}};a.useLayoutEffect(()=>{if(e.current&&t){const s=e.current.querySelector("table > thead");return s&&(s.style.position="sticky",s.style.top="0",s.style.zIndex="2",s.style.backgroundColor="#fff"),e.current.addEventListener("scroll",n),()=>{e.current.removeEventListener("scroll",n)}}},[]),a.useLayoutEffect(()=>{e.current&&t&&n()})},jD={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"},qD=H(k({},Y),{onSortChange:ne(),sort:y.exports.arrayOf(ce()),selectable:y.exports.bool,maxHeightPx:y.exports.number,maxHeightRem:y.exports.number,resizeable:y.exports.bool,resizeState:ce(),onResizeStateChange:ne()});function Ln(g){var S=g,{children:e,className:t,onSortChange:n,sort:s,"data-testid":o,unsafelyReplaceClassName:i,maxHeightPx:c,maxHeightRem:l,resizeable:p,resizeState:u,onResizeStateChange:f}=S,m=z(S,["children","className","onSortChange","sort","data-testid","unsafelyReplaceClassName","maxHeightPx","maxHeightRem","resizeable","resizeState","onResizeStateChange"]);const w=K(i||"sps-table-container",t),x=c?c/16:l,E=x?{maxHeight:`${x}rem`}:{},D=a.useRef(null);return zD(D,x),UD(D),YD(D,x),a.createElement(WD,{resizeable:p,resizeState:u,onResizeStateChange:f,sort:s,onSortChange:n},a.createElement("div",{ref:D,className:w,style:E},a.createElement("div",{className:"sps-table__shadow shadow--top"}),a.createElement("div",{className:"sps-table__shadow shadow--bottom"}),a.createElement("table",k({className:"sps-table",role:"table","data-testid":`${o}`},m),e)))}Object.assign(Ln,{props:jD,propTypes:qD,displayName:"SpsTable"});function JD(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 Ju=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:s,resizeState:o,setSingleResizeState:i}=a.useContext(Ni),c=!!s&&!!n,l=c?o==null?void 0:o[n]:void 0;return a.useLayoutEffect(()=>{let p=null,u=l;const f=JD(e.current);function m(){if(e.current){const E=u?`${u}px`:null;e.current.style.width=E,e.current.style.maxWidth=E,e.current.style.minWidth=E;const D=e.current.querySelector(".sps-table__header-cell-body");if(D&&(D.style.overflow=E?"hidden":null,D.style.textOverflow=E?"ellipsis":null),p){const I=e.current.querySelector(".sps-table__column-resizer");I&&(I.style.backgroundColor=Wr.colors.blue200)}if(e.current.classList.contains("sps-table__cell--pinned")||(e.current.style.position="relative"),f){const I=f.querySelectorAll("thead > tr > th");for(let N=0;N<I.length;N+=1){const _=I[N].querySelector(".sps-table__header-cell-body");_&&!_.title&&(_.title=_.textContent)}const v=f.querySelectorAll(`tbody > tr > td:nth-of-type(${e.current.cellIndex+1})`);for(let N=0;N<v.length;N+=1)v[N].style.width=E,v[N].style.maxWidth=E,v[N].style.minWidth=E,v[N].style.overflowWrap=E?"break-word":null,v[N].style.whiteSpace=E?"normal":null,v[N].title||(v[N].title=v[N].textContent)}}}const g=E=>{!e.current||(p=E.clientX,u=e.current.clientWidth,m())},S=E=>{if(!p||!e.current)return;const D=Math.max(Math.min(p-E.clientX,5),-5);D!==0&&(p=E.clientX,u=Math.max(e.current.clientWidth-D,40),m())},w=()=>{if(!e.current)return;p=null,m(),i(n,u);const E=e.current.querySelector(".sps-table__column-resizer");E&&(E.style.backgroundColor=null)},x=()=>{u=null,m(),i(n,u)};return c&&t.current&&(t.current.addEventListener("dragstart",g),t.current.addEventListener("mousedown",g),t.current.addEventListener("dblclick",x),window.addEventListener("mousemove",S),window.addEventListener("dragend",w),window.addEventListener("mouseup",w),m()),()=>{t.current&&(t.current.removeEventListener("dragstart",g),t.current.removeEventListener("mousedown",g),t.current.removeEventListener("dblclick",x)),window.removeEventListener("mousemove",S),window.removeEventListener("dragend",w),window.removeEventListener("mouseup",w)}},[c,l,n,i]),{isResizeable:c}},Zu={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"},Xu=H(k({},Y),{controlCell:y.exports.bool,sortKey:y.exports.string,resizeKey:y.exports.string,pinned:y.exports.bool});function Qe(u){var f=u,{children:e,className:t,controlCell:n,sortKey:s,resizeKey:o,"data-testid":i,unsafelyReplaceClassName:c,pinned:l}=f,p=z(f,["children","className","controlCell","sortKey","resizeKey","data-testid","unsafelyReplaceClassName","pinned"]);const{sort:m,setSort:g}=a.useContext(Ni),S=m==null?void 0:m.find(N=>N.key===s),w=()=>{if(s&&!n){const N=(S==null?void 0:S.direction)===M.SortDirection.ASCENDING?M.SortDirection.DESCENDING:M.SortDirection.ASCENDING;g([{key:s,direction:N}])}},x=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),w())},E=a.useRef(null);qu(l,E);const D=a.useRef(null),{isResizeable:I}=Ju({tableHeaderRef:E,resizerRef:D,resizeKey:o}),v=K(c||"sps-table__header",n&&"sps-table__header--control",!s&&"sps-table__header--sort-disabled",(S==null?void 0:S.direction)===M.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(S==null?void 0:S.direction)===M.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",l&&"sps-table__cell--pinned",I&&"sps-table__header--resizeable",t);return a.createElement("th",k({className:v,ref:E,role:"columnheader","aria-sort":(S==null?void 0:S.direction)||"none","data-testid":`${i}__header`},p),a.createElement("span",{className:"sps-table__header-cell-body","data-testid":`${i}__header-cell-body`,onClick:w,tabIndex:s?0:null,onKeyDown:x},e),I&&a.createElement("span",{ref:D,className:K("sps-table__column-resizer")}))}Object.assign(Qe,{props:Zu,propTypes:Xu,displayName:"SpsTableHeader"});function Qu(e){return a.createElement(Qe,k({},e))}Object.assign(Qu,{props:Zu,propTypes:Xu,displayName:"SpsTh"});const em={pinned:"boolean"},tm=H(k({},Y),{pinned:y.exports.bool});function fn(c){var l=c,{children:e,className:t,"data-testid":n,unsafelyReplaceClassName:s,pinned:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName","pinned"]);const p=K(s||"sps-table__head",o&&"sps-table__head--pinned",t);return a.createElement("thead",k({className:p,"data-testid":`${n}__head`},i),e)}Object.assign(fn,{props:em,propTypes:tm,displayName:"SpsTableHead"});function nm(e){return a.createElement(fn,k({},e))}Object.assign(nm,{props:em,propTypes:tm,displayName:"SpsThead"});const am={},sm=k({},Y);function Be(i){var c=i,{children:e,className:t,"data-testid":n,unsafelyReplaceClassName:s}=c,o=z(c,["children","className","data-testid","unsafelyReplaceClassName"]);const l=K(s||"sps-table__row",t);return a.createElement("tr",k({className:l,role:"row","data-testid":`${n}__row`},o),e)}Object.assign(Be,{props:am,propTypes:sm,displayName:"SpsTableRow"});function rm(e){return a.createElement(Be,k({},e))}Object.assign(rm,{props:am,propTypes:sm,displayName:"SpsTr"});const om={},im=k({},Y);function hn(e){const l=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName"]),c=K(o||"sps-table__body",n);return a.createElement("tbody",k({className:c,"data-testid":`${s}__body`},i),t)}Object.assign(hn,{props:om,propTypes:im,displayName:"SpsTableBody"});function lm(e){return a.createElement(hn,k({},e))}Object.assign(lm,{props:om,propTypes:im,displayName:"SpsTbody"});const cm={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"},dm=H(k({},Y),{buttonCell:y.exports.bool,controlCell:y.exports.bool,wrap:y.exports.oneOf([200,300,400,500,600]),pinned:y.exports.bool});function ae(e){const g=e,{buttonCell:t,children:n,className:s,controlCell:o,"data-testid":i,unsafelyReplaceClassName:c,wrap:l,pinned:p}=g,u=z(g,["buttonCell","children","className","controlCell","data-testid","unsafelyReplaceClassName","wrap","pinned"]),f=K(c||"sps-table__cell",t&&"sps-table__cell--button-cell",o&&"sps-table__cell--control",l&&`sps-table__cell--text-wrap-${l}`,p&&"sps-table__cell--pinned",s),m=a.useRef(null);return qu(p,m),a.createElement("td",k({className:f,ref:m,role:"cell","data-testid":`${i}__cell`},u),n)}Object.assign(ae,{props:cm,propTypes:dm,displayName:"SpsTableCell"});function pm(e){return a.createElement(ae,k({},e))}Object.assign(pm,{props:cm,propTypes:dm,displayName:"SpsTd"});const ZD={},XD=k({},Y),QD="sps-icon-button-panel";function um(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);const i=K(QD,t),[c]=Vt(e,[{type:Fe,props:{kind:M.ButtonKind.ICON}}]);return a.createElement("div",k({className:i},n),c)}Object.assign(um,{props:ZD,propTypes:XD,displayName:"SpsIconButtonPanel"});const mm={generalUsage:{label:"General Usage",customSection:()=>a.createElement("section",{id:"table-general-usage"},a.createElement("div",{className:"flex-color-header"},a.createElement("h4",null,"General Usage"),a.createElement(Fe,{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},kind:M.ButtonKind.LINK},"Back to Top")),a.createElement("h5",null,"Use Tables:"),a.createElement("ul",{className:"sps-body-14"},a.createElement("li",null,"Each record has more than 6 points of data"),a.createElement("li",null,"When more records need to be shown in the vertical space"),a.createElement("li",null,"When sorting options need to be precise (needs better explanation)."),a.createElement("li",null,"When tabular views are the expected/conventional view of thet data being displayed (one example: if the data is to be exported into a spreadsheet view).")),a.createElement("h5",null,"Avoid Tables:"),a.createElement("ul",{className:"sps-body-14"},a.createElement("li",null,"When large images need to be included amongst the data.")),a.createElement("div",null,"For additional help deciding which option best suits the data being displayed, refer to the List Usage Matrix."))},basic:{label:"Standard Tables",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"sps-body-14"},"Tables display tabular data in columns and rows with a header row used to identify the type of content in each column. The most common style of content displayed in tables is text (Small Body Copy), but additional elements such as tags and icons can be used when necessary."),a.createElement("br",null),a.createElement("div",{className:"sps-body-14"},"Tables can be used in conjunction with the"," ",a.createElement(e,{to:"List Toolbar"},"List Toolbar")," and"," ",a.createElement(e,{to:"Pagination"},"Pagination")," components for extended capabilities.")),examples:{basic:{react:T.code`
|
|
3522
|
+
calc(100% - ${s}px) ${-o}px`};return e.current&&(t(),e.current.addEventListener("scroll",t),window.addEventListener("scroll",t)),()=>{e.current&&e.current.removeEventListener("scroll",t),window.removeEventListener("scroll",t)}})},YD=(e,t)=>{a.useLayoutEffect(()=>{const n=e.current,s=n==null?void 0:n.querySelector("thead"),o=n==null?void 0:n.querySelector("table"),i=o==null?void 0:o.querySelector("tbody>tr"),c=i==null?void 0:i.querySelectorAll("td"),l=s==null?void 0:s.querySelectorAll("th"),p=document.body.querySelector(".sps-navbar-container");let u=n==null?void 0:n.querySelector(".placeholder-head"),f=null;const m=()=>{s&&(s.style.position=t?"sticky":null,s.style.top=t?"0":null,s.style.overflow=null,s.style.maxWidth=null,s.style.width=null,s.style.minWidth=null),u&&(u.style.width=null,u.style.height=null),c&&Array.from(c).forEach((x,C)=>{l[C].style.minWidth=null,l[C].style.width=null,l[C].style.maxWidth=null,x.style.minWidth=null,x.style.width=null,x.style.maxWidth=null})},g=()=>{s.scrollLeft=n.scrollLeft},S=()=>{let x=null;f===window?x=p?p.getBoundingClientRect().height:0:f instanceof HTMLElement&&(x=f.getBoundingClientRect().top);const C=n.scrollLeft,D=s.getBoundingClientRect(),I=n.getBoundingClientRect();if(D.top<=x&&x<=I.bottom-D.height&&I.top<=x){s.style.position="fixed",s.style.top=`${x}px`,s.style.overflow="hidden";const v=e.current.offsetWidth-e.current.clientWidth,k=`${I.width-v}px`;s.style.maxWidth=k,s.style.width=k,s.style.minWidth=k,c&&Array.from(c).forEach((R,B)=>{const M=R.getBoundingClientRect().width,L=l[B].getBoundingClientRect().width,F=`${Math.max(M,L)}px`;l[B].style.minWidth=F,l[B].style.width=F,l[B].style.maxWidth=F,R.style.minWidth=F,R.style.width=F,R.style.maxWidth=F}),u||(u=document.createElement("div"),u.style.width=`${D.width}px`,u.style.height=`${D.height}px`,u.className="placeholder-head",n.insertBefore(u,o))}else u&&(n.removeChild(u),u=null,m());n.scrollLeft=C,g()},w=()=>{m(),S(),g()};return s&&s.classList.contains("sps-table__head--pinned")&&(f=GD(n)||window,f.addEventListener("scroll",S),window.addEventListener("resize",w),n.addEventListener("scroll",g),w()),()=>{f&&(f.removeEventListener("scroll",S),window.removeEventListener("resize",w)),n&&n.removeEventListener("scroll",g)}})},zD=(e,t)=>{const n=()=>{const s=e.current,o=s==null?void 0:s.querySelector("table > thead"),i=s==null?void 0:s.querySelector("table"),c=s==null?void 0:s.querySelector(".shadow--top"),l=s==null?void 0:s.querySelector(".shadow--bottom");if(o&&i&&c&&l){l.style.left="0",l.style.bottom="0",c.style.left="0";const p=s.offsetHeight-(s==null?void 0:s.clientHeight),u=i.getBoundingClientRect().height,f=o.getBoundingClientRect().height,m=s.scrollTop,g=u+p-s.getBoundingClientRect().height-s.scrollTop,S=s.scrollLeft;l.style.bottom=`${-m}px`,l.style.left=`${S}px`,l.style.opacity=g>0?"1":"0",c.style.top=`${m+f}px`,c.style.left=`${S}px`,c.style.opacity=m>0?"1":"0"}};a.useLayoutEffect(()=>{if(e.current&&t){const s=e.current.querySelector("table > thead");return s&&(s.style.position="sticky",s.style.top="0",s.style.zIndex="2",s.style.backgroundColor="#fff"),e.current.addEventListener("scroll",n),()=>{e.current.removeEventListener("scroll",n)}}},[]),a.useLayoutEffect(()=>{e.current&&t&&n()})},jD={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"},qD=G(N({},Y),{onSortChange:ne(),sort:y.exports.arrayOf(ce()),selectable:y.exports.bool,maxHeightPx:y.exports.number,maxHeightRem:y.exports.number,resizeable:y.exports.bool,resizeState:ce(),onResizeStateChange:ne()});function Ln(g){var S=g,{children:e,className:t,onSortChange:n,sort:s,"data-testid":o,unsafelyReplaceClassName:i,maxHeightPx:c,maxHeightRem:l,resizeable:p,resizeState:u,onResizeStateChange:f}=S,m=z(S,["children","className","onSortChange","sort","data-testid","unsafelyReplaceClassName","maxHeightPx","maxHeightRem","resizeable","resizeState","onResizeStateChange"]);const w=K(i||"sps-table-container",t),x=c?c/16:l,C=x?{maxHeight:`${x}rem`}:{},D=a.useRef(null);return zD(D,x),UD(D),YD(D,x),a.createElement(WD,{resizeable:p,resizeState:u,onResizeStateChange:f,sort:s,onSortChange:n},a.createElement("div",{ref:D,className:w,style:C},a.createElement("div",{className:"sps-table__shadow shadow--top"}),a.createElement("div",{className:"sps-table__shadow shadow--bottom"}),a.createElement("table",N({className:"sps-table",role:"table","data-testid":`${o}`},m),e)))}Object.assign(Ln,{props:jD,propTypes:qD,displayName:"SpsTable"});function JD(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 Ju=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:s,resizeState:o,setSingleResizeState:i}=a.useContext(Ni),c=!!s&&!!n,l=c?o==null?void 0:o[n]:void 0;return a.useLayoutEffect(()=>{var R,B;let p=null,u=l,f=0;const m=JD(e.current),g=(R=e.current)==null?void 0:R.querySelector(".sps-table__column-resizer"),S=(B=e.current)==null?void 0:B.querySelector(".sps-table__column-resizer-guide");function w(){if(e.current&&p&&(g&&(g.style.backgroundColor=Wr.colors.blue200),S&&m&&(S.style.height=`${m.getBoundingClientRect().height}px`,S.style.display="block"),m)){const M=m.querySelectorAll("thead > tr > th");for(let L=0;L<M.length;L+=1){const F=M[L].querySelector(".sps-table__column-resizer");M[L].style.cursor="col-resize",M[L]!==e.current&&F&&(M[L].classList.remove("sps-table__header--resizeable"),F.style.display="none")}}}function x(){e.current&&p&&g&&S&&(g.style.right=`${f}px`,S.style.right=`${f}px`)}function C(){if(e.current){const M=u?`${u}px`:null;e.current.style.width=M,e.current.style.maxWidth=M,e.current.style.minWidth=M;const L=e.current.querySelector(".sps-table__header-cell-body");if(L&&(L.style.overflow=M?"hidden":null,L.style.textOverflow=M?"ellipsis":null),g&&S&&(g.style.right="0",g.style.backgroundColor=null,S.style.right="0",S.style.display="none"),e.current.classList.contains("sps-table__cell--pinned")||(e.current.style.position="relative"),m){const F=m.querySelectorAll("thead > tr > th");for(let $=0;$<F.length;$+=1){const V=F[$].querySelector(".sps-table__header-cell-body"),W=F[$].querySelector(".sps-table__column-resizer");F[$].style.cursor="default",F[$]!==e.current&&W&&(F[$].classList.add("sps-table__header--resizeable"),W.style.display="block"),V&&!V.title&&(V.title=V.textContent)}const A=m.querySelectorAll(`tbody > tr > td:nth-of-type(${e.current.cellIndex+1})`);for(let $=0;$<A.length;$+=1)A[$].style.width=M,A[$].style.maxWidth=M,A[$].style.minWidth=M,A[$].style.overflowWrap=M?"break-word":null,A[$].style.whiteSpace=M?"normal":null,A[$].title||(A[$].title=A[$].textContent)}}}const D=M=>{!e.current||(M.preventDefault(),p=M.clientX,u=e.current.clientWidth,w())},I=M=>{if(!p||!e.current)return;const L=Math.max(Math.min(p-M.clientX,40),-40);L!==0&&(p=M.clientX,f+=L,u=Math.max(u-L,40),x())},v=()=>{!e.current||(p=null,f=0,C(),i(n,u))},k=()=>{u=null,C(),i(n,u)};return c&&t.current&&(t.current.addEventListener("dragstart",D),t.current.addEventListener("mousedown",D),t.current.addEventListener("dblclick",k),window.addEventListener("mousemove",I),window.addEventListener("dragend",v),window.addEventListener("mouseup",v),C()),()=>{t.current&&(t.current.removeEventListener("dragstart",D),t.current.removeEventListener("mousedown",D),t.current.removeEventListener("dblclick",k)),window.removeEventListener("mousemove",I),window.removeEventListener("dragend",v),window.removeEventListener("mouseup",v)}},[c,l,n,i]),{isResizeable:c}},Zu={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"},Xu=G(N({},Y),{controlCell:y.exports.bool,sortKey:y.exports.string,resizeKey:y.exports.string,pinned:y.exports.bool});function Qe(u){var f=u,{children:e,className:t,controlCell:n,sortKey:s,resizeKey:o,"data-testid":i,unsafelyReplaceClassName:c,pinned:l}=f,p=z(f,["children","className","controlCell","sortKey","resizeKey","data-testid","unsafelyReplaceClassName","pinned"]);const{sort:m,setSort:g}=a.useContext(Ni),S=m==null?void 0:m.find(k=>k.key===s),w=()=>{if(s&&!n){const k=(S==null?void 0:S.direction)===_.SortDirection.ASCENDING?_.SortDirection.DESCENDING:_.SortDirection.ASCENDING;g([{key:s,direction:k}])}},x=k=>{(k.key==="Enter"||k.key===" "||k.key==="Spacebar")&&(k.preventDefault(),w())},C=a.useRef(null);qu(l,C);const D=a.useRef(null),{isResizeable:I}=Ju({tableHeaderRef:C,resizerRef:D,resizeKey:o}),v=K(c||"sps-table__header",n&&"sps-table__header--control",!s&&"sps-table__header--sort-disabled",(S==null?void 0:S.direction)===_.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(S==null?void 0:S.direction)===_.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",l&&"sps-table__cell--pinned",I&&"sps-table__header--resizeable",t);return a.createElement("th",N({className:v,ref:C,role:"columnheader","aria-sort":(S==null?void 0:S.direction)||"none","data-testid":`${i}__header`},p),a.createElement("span",{className:"sps-table__header-cell-body","data-testid":`${i}__header-cell-body`,onClick:w,tabIndex:s?0:null,onKeyDown:x},e),I&&a.createElement(a.Fragment,null,a.createElement("span",{ref:D,className:K("sps-table__column-resizer")}),a.createElement("span",{className:K("sps-table__column-resizer-guide")})))}Object.assign(Qe,{props:Zu,propTypes:Xu,displayName:"SpsTableHeader"});function Qu(e){return a.createElement(Qe,N({},e))}Object.assign(Qu,{props:Zu,propTypes:Xu,displayName:"SpsTh"});const em={pinned:"boolean"},tm=G(N({},Y),{pinned:y.exports.bool});function fn(c){var l=c,{children:e,className:t,"data-testid":n,unsafelyReplaceClassName:s,pinned:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName","pinned"]);const p=K(s||"sps-table__head",o&&"sps-table__head--pinned",t);return a.createElement("thead",N({className:p,"data-testid":`${n}__head`},i),e)}Object.assign(fn,{props:em,propTypes:tm,displayName:"SpsTableHead"});function nm(e){return a.createElement(fn,N({},e))}Object.assign(nm,{props:em,propTypes:tm,displayName:"SpsThead"});const am={},sm=N({},Y);function Be(i){var c=i,{children:e,className:t,"data-testid":n,unsafelyReplaceClassName:s}=c,o=z(c,["children","className","data-testid","unsafelyReplaceClassName"]);const l=K(s||"sps-table__row",t);return a.createElement("tr",N({className:l,role:"row","data-testid":`${n}__row`},o),e)}Object.assign(Be,{props:am,propTypes:sm,displayName:"SpsTableRow"});function rm(e){return a.createElement(Be,N({},e))}Object.assign(rm,{props:am,propTypes:sm,displayName:"SpsTr"});const om={},im=N({},Y);function hn(e){const l=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName"]),c=K(o||"sps-table__body",n);return a.createElement("tbody",N({className:c,"data-testid":`${s}__body`},i),t)}Object.assign(hn,{props:om,propTypes:im,displayName:"SpsTableBody"});function lm(e){return a.createElement(hn,N({},e))}Object.assign(lm,{props:om,propTypes:im,displayName:"SpsTbody"});const cm={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"},dm=G(N({},Y),{buttonCell:y.exports.bool,controlCell:y.exports.bool,wrap:y.exports.oneOf([200,300,400,500,600]),pinned:y.exports.bool});function ae(e){const g=e,{buttonCell:t,children:n,className:s,controlCell:o,"data-testid":i,unsafelyReplaceClassName:c,wrap:l,pinned:p}=g,u=z(g,["buttonCell","children","className","controlCell","data-testid","unsafelyReplaceClassName","wrap","pinned"]),f=K(c||"sps-table__cell",t&&"sps-table__cell--button-cell",o&&"sps-table__cell--control",l&&`sps-table__cell--text-wrap-${l}`,p&&"sps-table__cell--pinned",s),m=a.useRef(null);return qu(p,m),a.createElement("td",N({className:f,ref:m,role:"cell","data-testid":`${i}__cell`},u),n)}Object.assign(ae,{props:cm,propTypes:dm,displayName:"SpsTableCell"});function pm(e){return a.createElement(ae,N({},e))}Object.assign(pm,{props:cm,propTypes:dm,displayName:"SpsTd"});const ZD={},XD=N({},Y),QD="sps-icon-button-panel";function um(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);const i=K(QD,t),[c]=Vt(e,[{type:Fe,props:{kind:_.ButtonKind.ICON}}]);return a.createElement("div",N({className:i},n),c)}Object.assign(um,{props:ZD,propTypes:XD,displayName:"SpsIconButtonPanel"});const mm={generalUsage:{label:"General Usage",customSection:()=>a.createElement("section",{id:"table-general-usage"},a.createElement("div",{className:"flex-color-header"},a.createElement("h4",null,"General Usage"),a.createElement(Fe,{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},kind:_.ButtonKind.LINK},"Back to Top")),a.createElement("h5",null,"Use Tables:"),a.createElement("ul",{className:"sps-body-14"},a.createElement("li",null,"Each record has more than 6 points of data"),a.createElement("li",null,"When more records need to be shown in the vertical space"),a.createElement("li",null,"When sorting options need to be precise (needs better explanation)."),a.createElement("li",null,"When tabular views are the expected/conventional view of thet data being displayed (one example: if the data is to be exported into a spreadsheet view).")),a.createElement("h5",null,"Avoid Tables:"),a.createElement("ul",{className:"sps-body-14"},a.createElement("li",null,"When large images need to be included amongst the data.")),a.createElement("div",null,"For additional help deciding which option best suits the data being displayed, refer to the List Usage Matrix."))},basic:{label:"Standard Tables",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"sps-body-14"},"Tables display tabular data in columns and rows with a header row used to identify the type of content in each column. The most common style of content displayed in tables is text (Small Body Copy), but additional elements such as tags and icons can be used when necessary."),a.createElement("br",null),a.createElement("div",{className:"sps-body-14"},"Tables can be used in conjunction with the"," ",a.createElement(e,{to:"List Toolbar"},"List Toolbar")," and"," ",a.createElement(e,{to:"Pagination"},"Pagination")," components for extended capabilities.")),examples:{basic:{react:T.code`
|
|
3523
3523
|
function DemoComponent() {
|
|
3524
3524
|
const items = [
|
|
3525
3525
|
{
|
|
@@ -4663,7 +4663,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
4663
4663
|
</>
|
|
4664
4664
|
)
|
|
4665
4665
|
}
|
|
4666
|
-
`}}}},eI=
|
|
4666
|
+
`}}}},eI=G(N({},Y),{tabs:y.exports.arrayOf(ce()).isRequired,activeTab:ce(),onTabChange:ne()});function gm(e){const g=e,{tabs:t,activeTab:n,onTabChange:s,className:o,unsafelyReplaceClassName:i,"data-testid":c}=g,l=z(g,["tabs","activeTab","onTabChange","className","unsafelyReplaceClassName","data-testid"]),[p,u]=a.useState(null);a.useEffect(()=>{if(t.length)if(n){const S=t.find(w=>w.label===n.label);u(S)}else u(t[0])},[]);const f=(S,w)=>{S.preventDefault(),u(w),typeof s=="function"&&s(w)},m=K(i||"sps-tabs",o);return a.createElement("div",{className:m},a.createElement("nav",N({className:"sps-nav sps-nav--tabs","data-testid":c},l),t.map(S=>a.createElement("a",{key:S.label,id:S.id,className:K("sps-nav__item","sps-nav__link",S===p&&"active"),role:"tab","data-toggle":"tab",href:S.controlsId?`#${S.controlsId}`:null,"aria-controls":S.controlsId,"aria-selected":S===n,onClick:w=>{f(w,S)},"data-testid":`${c}__tab-link`},S.icon&&a.createElement("i",{className:`sps-icon sps-icon-${S.icon}`}),a.createElement("span",null,S.label),S.tag&&a.createElement("span",{className:"sps-tag sps-tag--key"},S.tag)))))}Object.assign(gm,{propTypes:eI,displayName:"SpsTabs"});const tI={resultsCount:"number",totalResults:"number",onClear:"() => void"},nI=G(N({},Y),{resultsCount:y.exports.number,totalResults:y.exports.number,onClear:ne()});function Sm(e){const w=e,{children:t,className:n,resultsCount:s,totalResults:o,onClear:i,"data-testid":c,unsafelyReplaceClassName:l}=w,p=z(w,["children","className","resultsCount","totalResults","onClear","data-testid","unsafelyReplaceClassName"]),{t:u}=a.useContext(Oe),f=K(l||"sps-search-results-bar",n),[m,g,S]=u("design-system:searchResultsBar.count",{count:s,total:o}).split(" ");return a.createElement("div",N({className:f,"data-testid":`${c}`},p),a.createElement("span",{className:"sps-search-results-bar__label","data-testid":`${c}__label`},u("design-system:searchResultsBar.matchingResults")),m&&!Number.isNaN(Number(m))&&a.createElement("span",{className:"sps-search-results-bar__count","data-testid":`${c}__count`},a.createElement("i",{className:"sps-icon sps-icon-double-angle-right"}),a.createElement("span",null,m)),S&&!Number.isNaN(Number(S))&&a.createElement("span",{className:"sps-search-results-bar__total","data-testid":`${c}__total`},g," ",S),a.createElement("div",{className:"sps-search-results-bar__buttons","data-testid":`${c}__button`},a.createElement("button",{type:"button",onClick:i},u("design-system:searchResultsBar.clear"))))}Object.assign(Sm,{props:tI,propTypes:nI,displayName:"SpsSearchResultsBar"});const aI={results:"number",selections:"{ [key: string]: string[] }",zeroStateText:"string",onClear:"() => void"},sI=G(N({},Y),{results:y.exports.number,selections:ce(),zeroStateText:y.exports.string,onClear:ne()});function ir(e){const g=e,{className:t,results:n=0,selections:s,zeroStateText:o,onClear:i,"data-testid":c,unsafelyReplaceClassName:l}=g,p=z(g,["className","results","selections","zeroStateText","onClear","data-testid","unsafelyReplaceClassName"]),{t:u}=a.useContext(Oe),f=K(l||"sps-search-results-bar-v2",t),m=s?Object.keys(s).reduce((S,w)=>(s[w].length>0&&(S[w]=s[w]),S),{}):{};return a.createElement("div",N({className:f,"data-testid":`${c}`},p),a.createElement("div",{className:"sps-search-results-bar-v2__results"},a.createElement("span",{"data-testid":`${c}__label`},u("design-system:searchResultsBar.results")),a.createElement(xt,{kind:_.TagKind.INFO},a.createElement("span",null,n))),a.createElement("div",{className:"sps-search-results-bar-v2__selections"},Object.keys(m).length>0?Object.keys(m).map((S,w)=>a.createElement(a.Fragment,null,a.createElement("span",{key:w,className:"sps-search-results-bar-v2__selection"},S,":"),m[S].map((x,C)=>a.createElement(xt,{key:C,kind:_.TagKind.KEY},a.createElement("span",null,x))))):a.createElement("span",{className:"font-italic"},o||u("design-system:searchResultsBar.noAdvancedSearchSelections"))),a.createElement("div",{className:"sps-search-results-bar-v2__buttons","data-testid":`${c}__button`},a.createElement(Fe,{kind:_.ButtonKind.LINK,onClick:i},u("design-system:searchResultsBar.clearResults"))))}Object.assign(ir,{props:aI,propTypes:sI,displayName:"SpsSearchResultsBarV2"});const bm={basic:{label:"Basic",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("p",null,"SpsSearchResultsBarV2 should be used with List Toolbar and Advanced Search."),a.createElement("p",null,"For more examples go to the Advanced Search section on the"," ",a.createElement(e,{to:"list-toolbar"},"List Toolbar")," page.")),examples:{basic:{react:T.code`
|
|
4667
4667
|
function Component() {
|
|
4668
4668
|
|
|
4669
4669
|
const [advSearch, setAdvSearch] = React.useState({
|
|
@@ -4791,7 +4791,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
4791
4791
|
</>
|
|
4792
4792
|
)
|
|
4793
4793
|
}
|
|
4794
|
-
`}}}},rI={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"},oI=
|
|
4794
|
+
`}}}},rI={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"},oI=G(N({},Y),{formArray:ce(),formGroup:ce(),formMeta:ce(),stacked:y.exports.bool});function ki(u){var f=u,{children:e,className:t,formArray:n,formGroup:s,formMeta:o,stacked:i,"data-testid":c,unsafelyReplaceClassName:l}=f,p=z(f,["children","className","formArray","formGroup","formMeta","stacked","data-testid","unsafelyReplaceClassName"]);const m=s||n,g=m||o,[S,w]=a.useState(!1);a.useEffect(()=>{if(g){const C=g.isFocused();!S&&C&&g.onFocus?g.onFocus():S&&!C&&g.onBlur&&g.onBlur(),w(C)}});const x=K(l||"sps-form-group",(m&&m.invalid||o&&(!o.isValid()||!o.contentsAreValid()))&&"sps-form-group--error",t);return a.createElement("div",N({className:x,"data-testid":c},p),a.createElement("div",{className:K("sps-input-group",i&&"sps-input-group--stacked")},e))}Object.assign(ki,{props:rI,propTypes:oI,displayName:"SpsInputGroup"});const iI={onSubmit:"FormEventHandler"},lI=G(N({},Y),{onSubmit:ne()});function lr(e){const{children:t,onSubmit:n}=e;function s(o){o.preventDefault(),n&&n(o)}return a.createElement("form",{onSubmit:s,className:"sps-list-toolbar__search-form",noValidate:!0},a.createElement(ki,{className:"sps-list-toolbar__search-field"},t))}Object.assign(lr,{props:iI,propTypes:lI,displayName:"SpsListToolbarSearch"});const cI={},dI=N({},Y);function cr(e){const{children:t}=e;return a.createElement("div",null,t)}Object.assign(cr,{props:cI,propTypes:dI,displayName:"SpsListToolbarSearchInfo"});const pI={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"},uI=G(N({},Y),{activeTab:ce(),advancedSearch:y.exports.shape({isOpen:y.exports.bool,enteredFields:y.exports.number}),onToggleAdvancedSearch:ne(),onTabChange:ne(),title:y.exports.string,tabs:y.exports.arrayOf(ce()),onToolbarPinned:ne(),selectable:y.exports.bool,isSelected:y.exports.bool,isIndeterminate:y.exports.bool,onSelectionChange:ne(),pinResultsBar:y.exports.bool,pinToolbar:y.exports.bool});function Mi(e){const Z=e,{activeTab:t,advancedSearch:n,children:s,className:o,onToggleAdvancedSearch:i,onTabChange:c,tabs:l,title:p,unsafelyReplaceClassName:u,onToolbarPinned:f,selectable:m,isSelected:g,isIndeterminate:S,onSelectionChange:w,pinResultsBar:x,pinToolbar:C=!0,"data-testid":D}=Z,I=z(Z,["activeTab","advancedSearch","children","className","onToggleAdvancedSearch","onTabChange","tabs","title","unsafelyReplaceClassName","onToolbarPinned","selectable","isSelected","isIndeterminate","onSelectionChange","pinResultsBar","pinToolbar","data-testid"]),{t:v}=a.useContext(Oe);let k=null;const[R,B]=a.useState(!1),M=a.useRef(),L=a.useRef(),F=T.lockToAnimationFrames(()=>{if(M.current){const oe=M.current.getBoundingClientRect();oe&&oe.height>0&&oe.top<=60&&(typeof k=="number"?window.scrollY<k&&(k=null,B(!1)):(k=window.scrollY,B(!0),i&&i(!1)))}});a.useEffect(()=>(window.addEventListener("scroll",F),()=>{window.removeEventListener("scroll",F)}),[]);const A=a.useRef(null);a.useLayoutEffect(()=>{if(R&&A.current)L.current.style.height=A.current.height,L.current.style.width=A.current.width,L.current.style.marginBottom=A.current.marginBottom;else if(!R){L.current.style.height=null,L.current.style.width=null,L.current.style.marginBottom=null;const oe=window.getComputedStyle(M.current);A.current={height:oe.height,width:oe.width,marginBottom:oe.marginBottom}}},[R]);function $(oe){c&&c(oe)}function V(){i&&i(!n.isOpen)}function W(oe){f&&f(oe)}a.useEffect(()=>{W(R)},[R]);const pe=K(u||"sps-list-toolbar",R&&C&&"sps-list-toolbar--pinned",R&&C&&"z-stratum-toolbar",n&&n.isOpen&&"sps-list-toolbar--advanced-search-open",o),[me,re,se,j]=Vt(s,[{type:lr},{type:cr},{type:ir}]);return a.createElement("div",{className:"sps-list-toolbar__wrapper",ref:L},a.createElement("div",N({className:pe,"data-testid":D,ref:M},I),a.createElement("div",{className:"sps-list-toolbar__content"},!!m&&a.createElement("div",{className:"sps-list-toolbar__selection-controls"},a.createElement(In,{checked:g,indeterminate:S,onChange:()=>{w==null||w(!g)}})),l&&a.createElement(gm,{tabs:l,onTabChange:$,activeTab:t,"data-testid":`${D}__tabs`}),a.createElement("div",{className:"sps-list-toolbar__search-controls"},!p&&me,!p&&re,me.length>0&&n&&a.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle","data-testid":`${D}__advanced-search`},a.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle-button-wrapper"},a.createElement(Fe,{kind:_.ButtonKind.LINK,onClick:V},v("design-system:listToolbar.advancedSearchToggle"))),n.enteredFields>0&&a.createElement(xt,{kind:_.TagKind.INFO},a.createElement("span",null,n.enteredFields))),p&&a.createElement("div",{"data-testid":`${D}-title`,className:"sps-list-toolbar__advanced-search-title"},p)),R?a.createElement("div",{className:"sps-list-toolbar__header-content"},a.createElement(Mt.Provider,{value:{fixed:!0}},j)):a.createElement("div",{className:"sps-list-toolbar__header-content"},j)),a.createElement("div",null,(!R||R&&x)&&se)))}Object.assign(Mi,{props:pI,propTypes:uI,displayName:"SpsListToolbar"});const mI={options:"SortOption[]",activeOption:"SortOption",onSortChange:"(option: SortOption) => void",defaultOption:"SortOption"},fI=G(N({},Y),{options:y.exports.arrayOf(ce()),activeOption:ce(),onSortChange:ne(),defaultOption:ce()});function _i(e){const{options:t,onSortChange:n,defaultOption:s,activeOption:o,className:i,unsafelyReplaceClassName:c}=e,l=t.map(u=>[{label:u.label,icon:u.icon},()=>n(u)]),p=K(c||"sps-list-toolbar-sort-by",i);return a.createElement(xn,{className:p,icon:(o==null?void 0:o.icon)||(s==null?void 0:s.icon),label:(o==null?void 0:o.label)||(s==null?void 0:s.label),options:l})}Object.assign(_i,{props:mI,propTypes:fI,displayName:"SpsListToolbarSortBy"});function vm(){const[e,t]=a.useState(!1);function n(){t(!1)}function s(){t(!0)}return a.createElement(a.Fragment,null,a.createElement("p",null,"The List Bar is divided into a number of different sections. It spans the entire width of the corresponding list."),a.createElement(Fe,{kind:_.ButtonKind.LINK,onClick:s},"View Content Order Example"),a.createElement(rr,{isOpen:e,onClose:n},a.createElement("h1",null,"Content Order"),a.createElement("img",{src:"assets/images/list-toolbar-example.svg",alt:"A List Toolbar with labels on each section",className:"w-100 mb-3"}),a.createElement(Ln,null,a.createElement(fn,null,a.createElement(Qe,{style:{width:"80px"}},"Order"),a.createElement(Qe,null,"Section"),a.createElement(Qe,null,"Notes")),a.createElement(hn,null,a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"1")),a.createElement(ae,null,"Checkbox"),a.createElement(ae,null,"For Content Rows and Content Tiles only.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"2")),a.createElement(ae,null,"Search/Filter Box"),a.createElement(ae,null)),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"3")),a.createElement(ae,null,"Saved Search"),a.createElement(ae,null)),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"4")),a.createElement(ae,null,"Advanced Search"),a.createElement(ae,null,"For more information, visit the Advanced Search page.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"5")),a.createElement(ae,null,"Column Editor"),a.createElement(ae,{wrap:500},"Use for Tables only. For more information, visit the Column Editor page.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"6")),a.createElement(ae,null,"List View Selector"),a.createElement(ae,null)),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"7")),a.createElement(ae,null,"Sorting"),a.createElement(ae,null)),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"8")),a.createElement(ae,null,"Buttons"),a.createElement(ae,{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 ym={general:{label:"General Usage",description:()=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Use a List Toolbar:"),a.createElement("ul",null,a.createElement("li",null,"When list content needs to be searched, filtered, sorted, or otherwise interacted with.")),a.createElement("h5",null,"Avoid a List Toolbar:"),a.createElement("ul",null,a.createElement("li",null,"When no list is present."),a.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:a.createElement(vm,null)},checkbox:{label:"Checkbox",description:({NavigateTo:e})=>a.createElement("p",null,"Use a Checkbox in the List Toolbar when items in a"," ",a.createElement(e,{to:"Content rows"},"Content Row")," or"," ",a.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:T.code`
|
|
4795
4795
|
function Component() {
|
|
4796
4796
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
4797
4797
|
searchText: "",
|
|
@@ -5366,7 +5366,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
5366
5366
|
</SpsListToolbar>
|
|
5367
5367
|
)
|
|
5368
5368
|
}
|
|
5369
|
-
`}}}},hI={kind:"FeedbackBlockKind",message:{type:"string",required:!0}},gI=
|
|
5369
|
+
`}}}},hI={kind:"FeedbackBlockKind",message:{type:"string",required:!0}},gI=G(N({},Y),{kind:be(_.FeedbackBlockKind),message:y.exports.node.isRequired});function en(e){const p=e,{className:t,kind:n=_.FeedbackBlockKind.INFO,message:s,"data-testid":o,unsafelyReplaceClassName:i}=p,c=z(p,["className","kind","message","data-testid","unsafelyReplaceClassName"]),l=K(i||"sps-micro-block",`sps-micro-block--${n}`,t);return a.createElement("div",N({className:l,"data-testid":o},c),a.createElement("i",{className:`sps-icon sps-icon-${_.FeedbackBlockIcons[n]}`,"aria-hidden":"true","data-testid":`${o}__icon`}),a.createElement("span",null,s))}Object.assign(en,{props:hI,propTypes:gI,displayName:"SpsMicroBlock"});const Tm={infoBlock:{label:"Info Micro Block",examples:{infoBlock:{jsx:T.code`
|
|
5370
5370
|
<SpsMicroBlock kind={FeedbackBlockKind.INFO} message="Hey, here's something neat."/>
|
|
5371
5371
|
`}}},successBlock:{label:"Success Micro Block",examples:{successBlock:{jsx:T.code`
|
|
5372
5372
|
<SpsMicroBlock kind={FeedbackBlockKind.SUCCESS} message="That was amazing!"/>
|
|
@@ -5376,7 +5376,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
5376
5376
|
<SpsMicroBlock kind={FeedbackBlockKind.ERROR} message="Uh oh, big problems."/>
|
|
5377
5377
|
`}}},tipBlock:{label:"Tip Micro Block",examples:{tipBlock:{jsx:T.code`
|
|
5378
5378
|
<SpsMicroBlock kind={FeedbackBlockKind.TIP} message="Pro Tip: Don't be a loser."/>
|
|
5379
|
-
`}}}},SI={kind:"ModalKind",size:"ModalSize",title:"string",onClose:"() => void",focusElementOnOpen:"React.MutableRefObject<HTMLElement>"},bI=
|
|
5379
|
+
`}}}},SI={kind:"ModalKind",size:"ModalSize",title:"string",onClose:"() => void",focusElementOnOpen:"React.MutableRefObject<HTMLElement>"},bI=G(N({},Y),{kind:be(_.ModalKind),size:be(_.ModalSize),title:y.exports.string,onClose:ne(),focusElementOnOpen:Ft()});function dr({children:e}){return a.createElement("div",{className:"sps-modal__footer"},e)}Object.assign(dr,{props:{},propTypes:{},displayName:"SpsModalFooter"});function Ri(u){var f=u,{children:e,className:t,id:n,kind:s=_.ModalKind.GENERAL,size:o=_.ModalSize.SMALL,onClose:i,focusElementOnOpen:c,title:l}=f,p=z(f,["children","className","id","kind","size","onClose","focusElementOnOpen","title"]);const m=Gn(n),g=K("sps-modal","z-stratum-dialog",`sps-modal--${s}`,`sps-modal--${o}`,t),{t:S}=a.useContext(Oe),w=a.useRef(),[x,C]=a.useState(!1);a.useEffect(()=>{const k=`${window.innerWidth-document.body.clientWidth}px`;return document.body.style.paddingRight=k,document.body.style.overflow="hidden",document.querySelectorAll(".z-stratum-bar").forEach(R=>{R.tempPaddingRightHolder=R.style.paddingRight,R.style.paddingRight=k}),C(!0),()=>{document.body.style.paddingRight="initial",document.body.style.overflow="auto",document.querySelectorAll(".z-stratum-bar").forEach(R=>{R.style.paddingRight=R.tempPaddingRightHolder||"",delete R.tempPaddingRightHolder})}},[]),a.useEffect(()=>{c&&c.current?c.current.focus():w.current&&w.current.focus()},[c,x]);const D=a.useCallback(k=>{if(k&&k.key==="Escape"&&i&&i(),k&&k.key==="Tab"){const R=w.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),B=R[0],M=R[R.length-1];R.length===0?k.preventDefault():k.shiftKey&&k.target===B?(k.preventDefault(),M.focus()):!k.shiftKey&&k.target===M&&(k.preventDefault(),B.focus())}},[i]),[[I],v]=Vt(e,[{type:dr}]);return x?a.createElement("div",{id:m.current,role:"dialog","aria-modal":!0,"aria-labelledby":`${m.current}-title`,className:g,onKeyDown:D,tabIndex:-1,ref:w},a.createElement("div",G(N({},p),{className:"sps-modal__dialog"}),a.createElement("div",{className:"sps-modal__titlebar"},a.createElement("div",{className:"sps-modal__title",id:`${m.current}-title`},l||S(`design-system:modal.defaultTitle.${s}`)),i&&a.createElement("div",{className:"sps-button sps-button--icon",onClick:i},a.createElement("button",{"aria-label":S("design-system:modal.close"),type:"button"},a.createElement("i",{className:"sps-icon sps-icon-x"})))),a.createElement("div",{className:"sps-modal__body"},a.createElement(Mt.Provider,{value:{parentElementRef:w,fixed:!0}},v)),I||a.createElement("div",{className:"sps-modal__footer"},a.createElement(Fe,{kind:s===_.ModalKind.SERIOUS_WARNING?_.ButtonKind.DELETE:_.ButtonKind.KEY,onClick:i},S("design-system:modal.defaultButtonLabel"))))):a.createElement(a.Fragment,null)}Object.assign(Ri,{props:SI,propTypes:bI,displayName:"SpsModal"});const wm={generalUsage:{label:"General Usage",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("h5",{className:"mt-2"},"Use a Modal:"),a.createElement("ul",null,a.createElement("li",null,"When the user needs to confirm a basic decision, such as deleting a record."),a.createElement("li",null,"When important information needs to be displayed to the user before continuing."),a.createElement("li",null,"When a simple selection, such as a single form input, is required before proceeding.")),a.createElement("h5",null,"Avoid a Modal:"),a.createElement("ul",null,a.createElement("li",null,"When a complex form is required. Use a"," ",a.createElement(e,{to:"Focused Task"},"Focused Task View")," instead."),a.createElement("li",null,"When sharing non-critical or tertiary information. Use a"," ",a.createElement(e,{to:"Growlers"},"Growler")," instead."))),examples:{noCloseButton:{description:()=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Close Button"),a.createElement("p",null,"Remove the Close Button in the upper right of the Modal if the user must choose the course of action before proceeding.")),react:T.code`
|
|
5380
5380
|
function Component() {
|
|
5381
5381
|
const [showModal, setShowModal] = React.useState(false);
|
|
5382
5382
|
|
|
@@ -5727,7 +5727,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
5727
5727
|
)}
|
|
5728
5728
|
</>;
|
|
5729
5729
|
}
|
|
5730
|
-
`}}}},vI={captionKey:"string",clearSearchOnBlur:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",formMeta:"SpsFormFieldMeta<any[]>",hideSelected:"boolean",icon:"SpsIcon",onChange:"ChangeEventHandler",onSearchChange:"(searchText: string) => void",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",placeholder:"string",tallOptionList:"boolean",textKey:"string",value:"any",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},yI=
|
|
5730
|
+
`}}}},vI={captionKey:"string",clearSearchOnBlur:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",formMeta:"SpsFormFieldMeta<any[]>",hideSelected:"boolean",icon:"SpsIcon",onChange:"ChangeEventHandler",onSearchChange:"(searchText: string) => void",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",placeholder:"string",tallOptionList:"boolean",textKey:"string",value:"any",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},yI=G(N({},Y),{action:ne(),captionKey:y.exports.string,clearSearchOnBlur:y.exports.bool,debounce:y.exports.number,disabled:y.exports.bool,disableSelected:y.exports.bool,comparisonKey:y.exports.string,formControl:ce(),formMeta:ce(),hideSelected:y.exports.bool,icon:be(_.SpsIcon),onChange:ne(),onSearchChange:ne(),options:y.exports.oneOfType([y.exports.array,y.exports.instanceOf(Promise),ne()]).isRequired,placeholder:y.exports.string,tallOptionList:y.exports.bool,textKey:y.exports.string,value:y.exports.any,zeroState:y.exports.string,loading:y.exports.bool,maxHeightOptionListPx:y.exports.number,maxHeightOptionListRem:y.exports.number,disableOptionsMemoization:y.exports.bool});function Li(V){var W=V,{action:e,captionKey:t,className:n,clearSearchOnBlur:s,debounce:o,disabled:i,disableSelected:c=!1,comparisonKey:l,formControl:p,formMeta:u,hideSelected:f,id:m,onChange:g,onSearchChange:S,options:w,placeholder:x,tallOptionList:C,textKey:D,unsafelyReplaceClassName:I,value:v,zeroState:k="There are no matching options.",loading:R,icon:B,maxHeightOptionListPx:M,maxHeightOptionListRem:L,disableOptionsMemoization:F,"data-testid":A}=W,$=z(W,["action","captionKey","className","clearSearchOnBlur","debounce","disabled","disableSelected","comparisonKey","formControl","formMeta","hideSelected","id","onChange","onSearchChange","options","placeholder","tallOptionList","textKey","unsafelyReplaceClassName","value","zeroState","loading","icon","maxHeightOptionListPx","maxHeightOptionListRem","disableOptionsMemoization","data-testid"]);const pe=u||p,{wrapperId:me,controlId:re}=Tt(m,pe),[se,j]=Kt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});a.useEffect(()=>{S&&S(se.searchText)},[se.searchText]);const Z=a.useRef(),oe=a.useRef(),ee=a.useRef(),te=a.useRef(),X=a.useRef();function le(){s&&j({searchText:""})}const{showPopup:q,doShowPopup:ye,doHidePopup:Ie}=Ta(Z,te,le);function Ce(){j({activeTagIndex:null}),ye()}function we(){setTimeout(()=>{ee.current.focus()},0)}function Ke(Se){if(X.current&&X.current.children.length&&Se!==null){const He=X.current.children[Se],Ae=He==null?void 0:He.querySelector(".sps-clickable-tag__icon");Ae&&Ae.focus()}}function $e(Se){j({searchText:""}),pe&&(pe.setValue(Se),pe.markAsDirty()),g&&g(new on({value:Se}))}function je(Se){v.indexOf(Se)===-1&&$e([...v,Se]),we()}function et(Se){const He=v.filter((Ae,Ge)=>Ge!==Se);$e(He)}function qe(Se){j({searchText:Se.target.value})}function ut(Se){if(!i){const He=!f&&!Se.target.selectionStart&&v&&v.length;switch(Se.key){case"Backspace":if(se.activeTagIndex===v.length-1){et(se.activeTagIndex),we();return}if(se.activeTagIndex!==null){et(se.activeTagIndex);return}if(He){$e(v.slice(0,v.length-1));return}break;case"Delete":if(se.activeTagIndex!==null){et(se.activeTagIndex);return}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":Se.preventDefault();break;case"Left":case"ArrowLeft":if(He){se.activeTagIndex===null?(j({activeTagIndex:v.length-1}),Ie(),Ke(v.length-1)):se.activeTagIndex>0&&(j({activeTagIndex:se.activeTagIndex-1}),Ie(),Ke(se.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(se.activeTagIndex!==null){se.activeTagIndex===v.length-1?(j({activeTagIndex:null}),ye(),ee.current.focus()):(j({activeTagIndex:se.activeTagIndex+1}),Ke(se.activeTagIndex+1));return}break;case"Tab":Ie();break}Se.persist(),j({keyDown:Se})}}function ct(Se){j({opensUpward:Se})}function vt(Se){$e([]),Se.stopPropagation()}function Ee(Se){j({optionIds:new Array(Se).fill("").map((He,Ae)=>`${me}-options-option-${Ae}`).join(",")})}const We=a.useCallback(()=>{j({searchText:""}),we()},[]),Ye=K(I||"sps-multi-select",q&&"sps-multi-select--open",q&&"z-stratum-dropdown",se.opensUpward&&"sps-multi-select--opens-upward",i&&"sps-form-control--disabled",n),Ve=new Array(v.length).fill(0).map((Se,He)=>`${me}_tag-${He}`);return a.createElement(it,{id:me,className:Ye,formControl:p,formMeta:u,ref:Z,inputRef:ee,focusInputOnClick:!0,onKeyDown:ut,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":Ve[se.activeTagIndex],"aria-owns":se.optionIds},a.createElement("div",{className:"sps-text-input",ref:oe},a.createElement("div",{className:K("sps-form-control",v&&!i&&"sps-form-control--clearable")},B&&a.createElement("i",{className:K("sps-text-input__icon","sps-icon",`sps-icon-${B}`)}),a.createElement("div",{className:"sps-multi-select__tags-and-input",ref:X},f?null:v.map((Se,He)=>a.createElement(Da,{id:Ve[He],role:"option",disabled:i,"aria-selected":"true",key:Ve[He],onRemove:()=>et(He)},D?Se[D]:Se)),a.createElement("input",N({type:"text",ref:ee,"data-testid":`${A}__option-list-input`,value:se.searchText,className:"sps-text-input__input",placeholder:v.length===0?x:void 0,id:re,onClick:Ce,onChange:qe,onFocus:Ce,onKeyDown:ut,disabled:i,role:"listbox","aria-multiselectable":"true","aria-owns":Ve.join(" ")},$))),v.length!==0&&!i?a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Se=>vt(Se)}):null)),a.createElement(ya,{id:`${me}_options`,ref:te,"data-testid":`${A}__option-list`,attachTo:oe,captionKey:t,disabledOptions:c?v:null,isOpen:q,comparisonKey:l,keepOpen:!0,keyDown:se.keyDown,options:w,specialAction:e,onOptionSelected:je,onPositionFlip:ct,hideInlineSearch:!0,optionRole:"option",onOptionListChanged:Ee,searchDebounce:o,search:se.searchText,tall:C,textKey:D,zeroState:k,loading:R,maxHeightPx:M,maxHeightRem:L,disableOptionsMemoization:F,onSpecialActionSelect:We}))}Object.assign(Li,{props:vI,propTypes:yI,displayName:"SpsMultiSelect"});const Em={general:{label:"General Usage",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Use a Mulit-Select"),a.createElement("ul",null,a.createElement("li",null,"When a list of predetermined values can be provided and the input allows multiple entries.")),a.createElement("h5",null,"Do Not Use a Multi-Select:"),a.createElement("ul",null,a.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",a.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",a.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),a.createElement("li",null,"When it is ideal to display all available options without requiring a click. Consider"," ",a.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",a.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead.")),a.createElement("h5",null,"Using Multi-Selects in a Form"),a.createElement("p",null,"Reference the ",a.createElement(e,{to:"form"},"Forms")," page for guidelines for placing"," ",a.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:T.code`
|
|
5731
5731
|
function Component() {
|
|
5732
5732
|
const [opts] = React.useState(["foo", "bar", "baz", "orp"])
|
|
5733
5733
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -6002,7 +6002,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6002
6002
|
<br />
|
|
6003
6003
|
{JSON.stringify(formValue)}
|
|
6004
6004
|
</>
|
|
6005
|
-
}`}}}},TI={},wI=
|
|
6005
|
+
}`}}}},TI={},wI=N({},Y);function Oi(e){const u=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=u,i=z(u,["children","className","data-testid","unsafelyReplaceClassName"]);let c;const l=[];a.Children.forEach(t,f=>{a.isValidElement(f)&&f.type==="i"?c=f:l.push(f)});const p=K(o||"sps-page-title",n);return a.createElement("div",N({className:p,"data-testid":`${s}`},i),c,a.createElement("div",{className:"sps-page-title__text","data-testid":`${s}__text`},l))}Object.assign(Oi,{props:TI,propTypes:wI,displayName:"SpsPageTitle"});const EI={},CI=N({},Y);function Bi(e){const l=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName"]),c=K(o||"sps-page-title__subtitle",n);return a.createElement("div",N({className:c,"data-testid":s},i),t)}Object.assign(Bi,{props:EI,propTypes:CI,displayName:"SpsPageSubtitle"});const Cm={basic:{label:"Basic",examples:{basic:{jsx:T.code`
|
|
6006
6006
|
<SpsPageTitle>
|
|
6007
6007
|
Cabela's Purchase Order #123456789012
|
|
6008
6008
|
</SpsPageTitle>
|
|
@@ -6028,7 +6028,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6028
6028
|
MacNeil Automotive Parts
|
|
6029
6029
|
</SpsPageSubtitle>
|
|
6030
6030
|
</SpsPageTitle>
|
|
6031
|
-
`}}}},xI={action:"SpsActionMethod",captionKey:"string",comparisonKey:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",notClearable:"boolean",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",onChange:"ChangeEventHandler",onOpen:"OnOpenHandler",placeholder:"string",searchDebounce:"number",searchPlaceholder:"string",tallOptionList:"boolean",textKey:"string",valueKey:"string",value:"any",zeroState:"string",autoFixWidth:"boolean",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},DI=H(k({},Y),{action:ne(),captionKey:y.exports.string,comparisonKey:y.exports.string,disabled:y.exports.bool,formControl:ce(),formMeta:ce(),notClearable:y.exports.bool,options:y.exports.oneOfType([y.exports.array,y.exports.instanceOf(Promise),ne()]).isRequired,onChange:ne(),onOpen:ne(),placeholder:y.exports.string,searchDebounce:y.exports.number,searchPlaceholder:y.exports.string,tallOptionList:y.exports.bool,textKey:y.exports.string,valueKey:y.exports.string,value:y.exports.any,zeroState:y.exports.string,autoFixWidth:y.exports.bool,loading:y.exports.bool,filterByTextAndCaptionKey:y.exports.bool,maxHeightOptionListPx:y.exports.number,maxHeightOptionListRem:y.exports.number,disableOptionsMemoization:y.exports.bool}),pr=a.forwardRef((e,t)=>{const vt=e,{action:n,autoFixWidth:s=!1,captionKey:o,className:i,comparisonKey:c,disabled:l,formControl:p,formMeta:u,id:f,notClearable:m,options:g,onChange:S,onClick:w,onOpen:x,placeholder:E,searchDebounce:D,searchPlaceholder:I="Search\u2026",tallOptionList:v,textKey:N,valueKey:_,unsafelyReplaceClassName:O,value:R,zeroState:B,loading:F,filterByTextAndCaptionKey:P,maxHeightOptionListPx:U,maxHeightOptionListRem:V,"data-testid":W,disableOptionsMemoization:pe}=vt,me=z(vt,["action","autoFixWidth","captionKey","className","comparisonKey","disabled","formControl","formMeta","id","notClearable","options","onChange","onClick","onOpen","placeholder","searchDebounce","searchPlaceholder","tallOptionList","textKey","valueKey","unsafelyReplaceClassName","value","zeroState","loading","filterByTextAndCaptionKey","maxHeightOptionListPx","maxHeightOptionListRem","data-testid","disableOptionsMemoization"]),re=u||p,{wrapperId:se,controlId:j}=Tt(f,re),Z=a.useRef(null),oe=a.useRef(null),ee=a.useRef(null),{t:te}=a.useContext(Oe),[X,le]=Kt({isOpen:!1,value:R,text:"",keyDown:null,opensUpward:!1,optionIds:""});function q(Ee){le({value:Ee,text:Ee&&N?Ee[N]:Ee})}function ye(Ee){q(Ee);const We=Ee&&_&&typeof Ee=="object"?Ee[_]:Ee;re&&(re.setValue(We),re.markAsDirty()),S&&S(new on({value:We}))}a.useEffect(()=>{q(R)},[R,N]);function Ie(){ye(void 0)}function Ce(){le({isOpen:!1})}function we(Ee){Ee.nativeEvent.stopImmediatePropagation(),l||le({isOpen:!X.isOpen})}function Ke(Ee){l||(["Up","ArrowUp","Down","ArrowDown"," ","Spacebar"].indexOf(Ee.key)>-1&&Ee.preventDefault(),Ee.persist(),le({keyDown:Ee}))}function $e(Ee){le({isOpen:Ee})}function je(Ee){le({opensUpward:Ee})}function et(Ee){Ee.detail!==se&&le({isOpen:!1})}function qe(Ee){le({optionIds:new Array(Ee).fill("").map((We,Ye)=>`${se}-options-option-${Ye}`).join(",")})}a.useEffect(()=>(document.addEventListener("click",Ce),document.addEventListener("DropdownOpened",et),()=>{document.removeEventListener("click",Ce),document.removeEventListener("DropdownOpened",et)}),[]),a.useLayoutEffect(()=>{if(s&&ee.current&&Z.current){Z.current.style.width=null;const We=`${Z.current.getBoundingClientRect().width+6}px`;Z.current.style.width=We,ee.current.style.width=We,ee.current.style.maxWidth=We}}),Zr(()=>{if(X.isOpen){x==null||x();const Ee=document.createEvent("CustomEvent");Ee.initCustomEvent("DropdownOpened",!1,!1,se),document.dispatchEvent(Ee)}else oe.current.focus()},[X.isOpen]),a.useImperativeHandle(t,()=>({focus:()=>{oe.current.focus()}}));const ut=K(O||"sps-select",X.isOpen&&"sps-select--open",X.isOpen&&"z-stratum-dropdown",X.opensUpward&&"sps-select--opens-upward",i),ct=X.text||E||te("design-system:select.defaultPlaceholder");return a.createElement(it,k({id:se,className:ut,onKeyDown:Ke,formControl:p,formMeta:u,ref:oe,role:"listbox","aria-owns":X.optionIds,"data-testid":W,onClick:w},me),a.createElement("div",{className:K("sps-select__dropctrl",l&&"disabled"),id:j,tabIndex:0,onClick:we,ref:ee,title:ct,"data-testid":`${W}-dropctrl`},a.createElement("div",{className:"sps-select__dropctrl-content"},a.createElement("span",{className:K("sps-select__value",!X.text&&"sps-select__value--placeholder"),"data-testid":`${W}-value`},ct),X.value&&!m&&!l&&a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-select__clear-btn",onClick:Ie,"data-testid":`${W}-clear-value`}),a.createElement("i",{className:"sps-icon sps-icon-chevron-down"}))),a.createElement(ya,{id:`${se}-options`,ref:Z,attachTo:ee,captionKey:o,comparisonKey:c,isOpen:X.isOpen,keyDown:X.keyDown,options:g,onOptionSelected:ye,onPositionFlip:je,onSelfToggle:$e,searchDebounce:D,searchPlaceholder:I,selectedOption:X.value,specialAction:n,tall:v,textKey:N,filterByTextAndCaptionKey:P,optionRole:"option",valueKey:_,onOptionListChanged:qe,zeroState:B,ignoreWidthStyles:s,loading:F,maxHeightPx:U,maxHeightRem:V,disableOptionsMemoization:pe,"data-testid":`${W}-option-list`}))});Object.assign(pr,{props:xI,propTypes:DI,displayName:"SpsSelect"});const II={page:"number",numPages:"number",onPageChange:"(number) => void",disabled:"boolean",unknownPageCount:"boolean"},NI=k({numPages:y.exports.number,onPageChange:ne(),page:y.exports.number,disabled:y.exports.bool,unknownPageCount:y.exports.bool},Y);function ur(e){const v=e,{numPages:t=0,onPageChange:n,page:s=1,unsafelyReplaceClassName:o,className:i,"data-testid":c,disabled:l=!1,unknownPageCount:p=!1}=v,u=z(v,["numPages","onPageChange","page","unsafelyReplaceClassName","className","data-testid","disabled","unknownPageCount"]),{t:f}=a.useContext(Oe),[m,g]=a.useState(s),[S,w]=a.useState(s);a.useEffect(()=>{w(s),g(s)},[s]);function x(N){const _=T.constrain(N,[1,t]);N!==S&&(w(_),g(_),n&&typeof n=="function"&&n(_))}function E(N){g(Number(N.target.value)||"")}const D=K(o||"sps-page-selector",i),I=Gn(null);return a.createElement("div",k({className:D,"data-testid":c},u),!p&&a.createElement(a.Fragment,null,a.createElement("div",{className:"sps-pagination__input-wrapper","data-testid":`${c}__input`},a.createElement("div",{className:"sps-form-control sps-pagination__input-sizer"},m),a.createElement("label",{htmlFor:I.current,className:"sr-only"},f("design-system:pagination.page")),a.createElement(ga,{onSubmit:()=>x(Number(m))},a.createElement("input",{id:I.current,type:"text",value:m,onInput:E,onChange:()=>{},className:"sps-form-control sps-pagination__input",disabled:l,onBlur:()=>x(Number(m))}))),a.createElement("span",{className:"sps-page-selector__total-pages","data-testid":`${c}_page-count`},Number.isNaN(t)?f("design-system:pagination.ofMany"):f("design-system:pagination.ofPageCount",{pageCount:t}))),a.createElement("div",{className:"sps-icon-button-panel","data-testid":`${c}__buttons`},a.createElement("div",{className:K("sps-button","sps-button--icon",(S===1||l)&&"sps-button--disabled")},a.createElement("button",{type:"button",onClick:()=>x(S-1),disabled:S===1||l,title:f("design-system:pagination.prevPage")},a.createElement("i",{className:"sps-icon sps-icon-chevron-left","aria-hidden":"true"}))),a.createElement("div",{className:K("sps-button","sps-button--icon",(S===t||l)&&"sps-button--disabled")},a.createElement("button",{type:"button",onClick:()=>x(S+1),disabled:S===t||l,title:f("design-system:pagination.nextPage")},a.createElement("i",{className:"sps-icon sps-icon-chevron-right","aria-hidden":"true"})))))}Object.assign(ur,{props:II,propTypes:NI,displayName:"SpsPageSelector"});const kI={page:"number",pageSize:"number",pageSizeOptions:"Array<number>",totalResults:"number",onPageChange:"(page: number, pageSize: number, indices: [number, number]) => void",disabled:"boolean",unknownPageCount:"boolean"},MI=k({onPageChange:ne().isRequired,page:y.exports.number,pageSize:y.exports.number,pageSizeOptions:y.exports.arrayOf(y.exports.number),totalResults:y.exports.number,disabled:y.exports.bool,unknownPageCount:y.exports.bool},Y);function Ai(e){const O=e,{className:t,onPageChange:n,page:s=1,pageSizeOptions:o=M.DEFAULT_PAGE_SIZE_OPTIONS,pageSize:i=o[0],"data-testid":c,totalResults:l,unsafelyReplaceClassName:p,disabled:u=!1,unknownPageCount:f=!1}=O,m=z(O,["className","onPageChange","page","pageSizeOptions","pageSize","data-testid","totalResults","unsafelyReplaceClassName","disabled","unknownPageCount"]),[g,S]=Kt({page:s,pageSize:i,numPages:0,indices:[0,0]});function w(R=g.pageSize){return Math.ceil(l/R)}function x(R=g.page,B=g.pageSize){const F=w(B),P=R===F&&l%B||B,U=F===0?0:P,V=(R-1)*B;return F===0?[0,0]:[V+1,V+U]}function E(R){const B={page:R,indices:x(R)};return S(B),B}function D(R,B){const F={page:B,pageSize:R,numPages:w(R),indices:x(B,R)};return S(F),F}a.useEffect(()=>{s!==g.page&&E(s)},[s]),a.useEffect(()=>{i!==g.pageSize&&D(i,s!==g.page?s:g.page)},[i]),a.useEffect(()=>{S({numPages:w(),indices:x()})},[l]);function I(){return typeof l=="number"?l:"many"}function v(R){const B=D(R.target.value,1);n(B.page,B.pageSize,B.indices)}function N(R){const B=E(R);n(B.page,g.pageSize,B.indices)}const _=K(p||"sps-pagination",t);return a.createElement("div",k({className:_,"data-testid":c},m),a.createElement("div",{"data-testid":`${c}__size-selector`,className:"sps-page-size-selector"},"View",a.createElement(pr,{options:o,onChange:v,notClearable:!0,autoFixWidth:!0,value:g.pageSize,className:"ml-1 mr-1",disabled:u}),"Per Page"),f?a.createElement("div",{className:"sps-pagination__details"},`Viewing ${g.indices[0]} - ${g.indices[1]}`):a.createElement("div",{className:"sps-pagination__details"},`Viewing ${g.indices[0]} - ${g.indices[1]} of ${I()}`),a.createElement(ur,{numPages:g.numPages,page:g.page,onPageChange:N,disabled:u,unknownPageCount:f}))}Object.assign(Ai,{props:kI,propTypes:MI,displayName:"SpsPagination"});const xm={general:{label:"General Usage",description:()=>a.createElement(a.Fragment,null,a.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."),a.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})=>a.createElement(a.Fragment,null,a.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."),a.createElement("ul",null,a.createElement("li",null,a.createElement("p",null,a.createElement("span",{className:"sps-text-semibold"},"Results-per-page Select")," ","(left): allows the user to adjust the number of records being displayed per page.*")),a.createElement("li",null,a.createElement("p",null,a.createElement("span",{className:"sps-text-semibold"},"Viewing details")," (middle): describes which results are being displayed on the current page.")),a.createElement("li",null,a.createElement("p",null,a.createElement("span",{className:"sps-text-semibold"},"Page Navigator")," (right): allows the user to navigate between pages of results"))),a.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."),a.createElement("br",null),a.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"," ",a.createElement(e,{to:"/style-and-layout/page-types"},"Page Types")," page.")),examples:{basic:{description:()=>a.createElement("h4",null,"Building the Standard Pagination Bar"),react:T.code`
|
|
6031
|
+
`}}}},xI={action:"SpsActionMethod",captionKey:"string",comparisonKey:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",notClearable:"boolean",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",onChange:"ChangeEventHandler",onOpen:"OnOpenHandler",placeholder:"string",searchDebounce:"number",searchPlaceholder:"string",tallOptionList:"boolean",textKey:"string",valueKey:"string",value:"any",zeroState:"string",autoFixWidth:"boolean",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},DI=G(N({},Y),{action:ne(),captionKey:y.exports.string,comparisonKey:y.exports.string,disabled:y.exports.bool,formControl:ce(),formMeta:ce(),notClearable:y.exports.bool,options:y.exports.oneOfType([y.exports.array,y.exports.instanceOf(Promise),ne()]).isRequired,onChange:ne(),onOpen:ne(),placeholder:y.exports.string,searchDebounce:y.exports.number,searchPlaceholder:y.exports.string,tallOptionList:y.exports.bool,textKey:y.exports.string,valueKey:y.exports.string,value:y.exports.any,zeroState:y.exports.string,autoFixWidth:y.exports.bool,loading:y.exports.bool,filterByTextAndCaptionKey:y.exports.bool,maxHeightOptionListPx:y.exports.number,maxHeightOptionListRem:y.exports.number,disableOptionsMemoization:y.exports.bool}),pr=a.forwardRef((e,t)=>{const vt=e,{action:n,autoFixWidth:s=!1,captionKey:o,className:i,comparisonKey:c,disabled:l,formControl:p,formMeta:u,id:f,notClearable:m,options:g,onChange:S,onClick:w,onOpen:x,placeholder:C,searchDebounce:D,searchPlaceholder:I="Search\u2026",tallOptionList:v,textKey:k,valueKey:R,unsafelyReplaceClassName:B,value:M,zeroState:L,loading:F,filterByTextAndCaptionKey:A,maxHeightOptionListPx:$,maxHeightOptionListRem:V,"data-testid":W,disableOptionsMemoization:pe}=vt,me=z(vt,["action","autoFixWidth","captionKey","className","comparisonKey","disabled","formControl","formMeta","id","notClearable","options","onChange","onClick","onOpen","placeholder","searchDebounce","searchPlaceholder","tallOptionList","textKey","valueKey","unsafelyReplaceClassName","value","zeroState","loading","filterByTextAndCaptionKey","maxHeightOptionListPx","maxHeightOptionListRem","data-testid","disableOptionsMemoization"]),re=u||p,{wrapperId:se,controlId:j}=Tt(f,re),Z=a.useRef(null),oe=a.useRef(null),ee=a.useRef(null),{t:te}=a.useContext(Oe),[X,le]=Kt({isOpen:!1,value:M,text:"",keyDown:null,opensUpward:!1,optionIds:""});function q(Ee){le({value:Ee,text:Ee&&k?Ee[k]:Ee})}function ye(Ee){q(Ee);const We=Ee&&R&&typeof Ee=="object"?Ee[R]:Ee;re&&(re.setValue(We),re.markAsDirty()),S&&S(new on({value:We}))}a.useEffect(()=>{q(M)},[M,k]);function Ie(){ye(void 0)}function Ce(){le({isOpen:!1})}function we(Ee){Ee.nativeEvent.stopImmediatePropagation(),l||le({isOpen:!X.isOpen})}function Ke(Ee){l||(["Up","ArrowUp","Down","ArrowDown"," ","Spacebar"].indexOf(Ee.key)>-1&&Ee.preventDefault(),Ee.persist(),le({keyDown:Ee}))}function $e(Ee){le({isOpen:Ee})}function je(Ee){le({opensUpward:Ee})}function et(Ee){Ee.detail!==se&&le({isOpen:!1})}function qe(Ee){le({optionIds:new Array(Ee).fill("").map((We,Ye)=>`${se}-options-option-${Ye}`).join(",")})}a.useEffect(()=>(document.addEventListener("click",Ce),document.addEventListener("DropdownOpened",et),()=>{document.removeEventListener("click",Ce),document.removeEventListener("DropdownOpened",et)}),[]),a.useLayoutEffect(()=>{if(s&&ee.current&&Z.current){Z.current.style.width=null;const We=`${Z.current.getBoundingClientRect().width+6}px`;Z.current.style.width=We,ee.current.style.width=We,ee.current.style.maxWidth=We}}),Zr(()=>{if(X.isOpen){x==null||x();const Ee=document.createEvent("CustomEvent");Ee.initCustomEvent("DropdownOpened",!1,!1,se),document.dispatchEvent(Ee)}else oe.current.focus()},[X.isOpen]),a.useImperativeHandle(t,()=>({focus:()=>{oe.current.focus()}}));const ut=K(B||"sps-select",X.isOpen&&"sps-select--open",X.isOpen&&"z-stratum-dropdown",X.opensUpward&&"sps-select--opens-upward",i),ct=X.text||C||te("design-system:select.defaultPlaceholder");return a.createElement(it,N({id:se,className:ut,onKeyDown:Ke,formControl:p,formMeta:u,ref:oe,role:"listbox","aria-owns":X.optionIds,"data-testid":W,onClick:w},me),a.createElement("div",{className:K("sps-select__dropctrl",l&&"disabled"),id:j,tabIndex:0,onClick:we,ref:ee,title:ct,"data-testid":`${W}-dropctrl`},a.createElement("div",{className:"sps-select__dropctrl-content"},a.createElement("span",{className:K("sps-select__value",!X.text&&"sps-select__value--placeholder"),"data-testid":`${W}-value`},ct),X.value&&!m&&!l&&a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-select__clear-btn",onClick:Ie,"data-testid":`${W}-clear-value`}),a.createElement("i",{className:"sps-icon sps-icon-chevron-down"}))),a.createElement(ya,{id:`${se}-options`,ref:Z,attachTo:ee,captionKey:o,comparisonKey:c,isOpen:X.isOpen,keyDown:X.keyDown,options:g,onOptionSelected:ye,onPositionFlip:je,onSelfToggle:$e,searchDebounce:D,searchPlaceholder:I,selectedOption:X.value,specialAction:n,tall:v,textKey:k,filterByTextAndCaptionKey:A,optionRole:"option",valueKey:R,onOptionListChanged:qe,zeroState:L,ignoreWidthStyles:s,loading:F,maxHeightPx:$,maxHeightRem:V,disableOptionsMemoization:pe,"data-testid":`${W}-option-list`}))});Object.assign(pr,{props:xI,propTypes:DI,displayName:"SpsSelect"});const II={page:"number",numPages:"number",onPageChange:"(number) => void",disabled:"boolean",unknownPageCount:"boolean"},NI=N({numPages:y.exports.number,onPageChange:ne(),page:y.exports.number,disabled:y.exports.bool,unknownPageCount:y.exports.bool},Y);function ur(e){const v=e,{numPages:t=0,onPageChange:n,page:s=1,unsafelyReplaceClassName:o,className:i,"data-testid":c,disabled:l=!1,unknownPageCount:p=!1}=v,u=z(v,["numPages","onPageChange","page","unsafelyReplaceClassName","className","data-testid","disabled","unknownPageCount"]),{t:f}=a.useContext(Oe),[m,g]=a.useState(s),[S,w]=a.useState(s);a.useEffect(()=>{w(s),g(s)},[s]);function x(k){const R=T.constrain(k,[1,t]);k!==S&&(w(R),g(R),n&&typeof n=="function"&&n(R))}function C(k){g(Number(k.target.value)||"")}const D=K(o||"sps-page-selector",i),I=Gn(null);return a.createElement("div",N({className:D,"data-testid":c},u),!p&&a.createElement(a.Fragment,null,a.createElement("div",{className:"sps-pagination__input-wrapper","data-testid":`${c}__input`},a.createElement("div",{className:"sps-form-control sps-pagination__input-sizer"},m),a.createElement("label",{htmlFor:I.current,className:"sr-only"},f("design-system:pagination.page")),a.createElement(ga,{onSubmit:()=>x(Number(m))},a.createElement("input",{id:I.current,type:"text",value:m,onInput:C,onChange:()=>{},className:"sps-form-control sps-pagination__input",disabled:l,onBlur:()=>x(Number(m))}))),a.createElement("span",{className:"sps-page-selector__total-pages","data-testid":`${c}_page-count`},Number.isNaN(t)?f("design-system:pagination.ofMany"):f("design-system:pagination.ofPageCount",{pageCount:t}))),a.createElement("div",{className:"sps-icon-button-panel","data-testid":`${c}__buttons`},a.createElement("div",{className:K("sps-button","sps-button--icon",(S===1||l)&&"sps-button--disabled")},a.createElement("button",{type:"button",onClick:()=>x(S-1),disabled:S===1||l,title:f("design-system:pagination.prevPage")},a.createElement("i",{className:"sps-icon sps-icon-chevron-left","aria-hidden":"true"}))),a.createElement("div",{className:K("sps-button","sps-button--icon",(S===t||l)&&"sps-button--disabled")},a.createElement("button",{type:"button",onClick:()=>x(S+1),disabled:S===t||l,title:f("design-system:pagination.nextPage")},a.createElement("i",{className:"sps-icon sps-icon-chevron-right","aria-hidden":"true"})))))}Object.assign(ur,{props:II,propTypes:NI,displayName:"SpsPageSelector"});const kI={page:"number",pageSize:"number",pageSizeOptions:"Array<number>",totalResults:"number",onPageChange:"(page: number, pageSize: number, indices: [number, number]) => void",disabled:"boolean",unknownPageCount:"boolean"},MI=N({onPageChange:ne().isRequired,page:y.exports.number,pageSize:y.exports.number,pageSizeOptions:y.exports.arrayOf(y.exports.number),totalResults:y.exports.number,disabled:y.exports.bool,unknownPageCount:y.exports.bool},Y);function Ai(e){const B=e,{className:t,onPageChange:n,page:s=1,pageSizeOptions:o=_.DEFAULT_PAGE_SIZE_OPTIONS,pageSize:i=o[0],"data-testid":c,totalResults:l,unsafelyReplaceClassName:p,disabled:u=!1,unknownPageCount:f=!1}=B,m=z(B,["className","onPageChange","page","pageSizeOptions","pageSize","data-testid","totalResults","unsafelyReplaceClassName","disabled","unknownPageCount"]),[g,S]=Kt({page:s,pageSize:i,numPages:0,indices:[0,0]});function w(M=g.pageSize){return Math.ceil(l/M)}function x(M=g.page,L=g.pageSize){const F=w(L),A=M===F&&l%L||L,$=F===0?0:A,V=(M-1)*L;return F===0?[0,0]:[V+1,V+$]}function C(M){const L={page:M,indices:x(M)};return S(L),L}function D(M,L){const F={page:L,pageSize:M,numPages:w(M),indices:x(L,M)};return S(F),F}a.useEffect(()=>{s!==g.page&&C(s)},[s]),a.useEffect(()=>{i!==g.pageSize&&D(i,s!==g.page?s:g.page)},[i]),a.useEffect(()=>{S({numPages:w(),indices:x()})},[l]);function I(){return typeof l=="number"?l:"many"}function v(M){const L=D(M.target.value,1);n(L.page,L.pageSize,L.indices)}function k(M){const L=C(M);n(L.page,g.pageSize,L.indices)}const R=K(p||"sps-pagination",t);return a.createElement("div",N({className:R,"data-testid":c},m),a.createElement("div",{"data-testid":`${c}__size-selector`,className:"sps-page-size-selector"},"View",a.createElement(pr,{options:o,onChange:v,notClearable:!0,autoFixWidth:!0,value:g.pageSize,className:"ml-1 mr-1",disabled:u}),"Per Page"),f?a.createElement("div",{className:"sps-pagination__details"},`Viewing ${g.indices[0]} - ${g.indices[1]}`):a.createElement("div",{className:"sps-pagination__details"},`Viewing ${g.indices[0]} - ${g.indices[1]} of ${I()}`),a.createElement(ur,{numPages:g.numPages,page:g.page,onPageChange:k,disabled:u,unknownPageCount:f}))}Object.assign(Ai,{props:kI,propTypes:MI,displayName:"SpsPagination"});const xm={general:{label:"General Usage",description:()=>a.createElement(a.Fragment,null,a.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."),a.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})=>a.createElement(a.Fragment,null,a.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."),a.createElement("ul",null,a.createElement("li",null,a.createElement("p",null,a.createElement("span",{className:"sps-text-semibold"},"Results-per-page Select")," ","(left): allows the user to adjust the number of records being displayed per page.*")),a.createElement("li",null,a.createElement("p",null,a.createElement("span",{className:"sps-text-semibold"},"Viewing details")," (middle): describes which results are being displayed on the current page.")),a.createElement("li",null,a.createElement("p",null,a.createElement("span",{className:"sps-text-semibold"},"Page Navigator")," (right): allows the user to navigate between pages of results"))),a.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."),a.createElement("br",null),a.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"," ",a.createElement(e,{to:"/style-and-layout/page-types"},"Page Types")," page.")),examples:{basic:{description:()=>a.createElement("h4",null,"Building the Standard Pagination Bar"),react:T.code`
|
|
6032
6032
|
function Component() {
|
|
6033
6033
|
const [page, setPage] = React.useState(2);
|
|
6034
6034
|
const [pageSize, setPageSize] = React.useState(25);
|
|
@@ -6100,7 +6100,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6100
6100
|
function Component() {
|
|
6101
6101
|
return <SpsPageSelector numPages={25} onPageChange={() => {}} disabled />;
|
|
6102
6102
|
}
|
|
6103
|
-
`}}}},_I={active:"boolean",as:"React.ElementType"};function mr(e){const p=e,{active:t,as:n="a",children:s,className:o,unsafelyReplaceClassName:i}=p,c=z(p,["active","as","children","className","unsafelyReplaceClassName"]),l=K(i||"sps-nav__item","sps-nav__link",t&&"active");return a.createElement(n,
|
|
6103
|
+
`}}}},_I={active:"boolean",as:"React.ElementType"};function mr(e){const p=e,{active:t,as:n="a",children:s,className:o,unsafelyReplaceClassName:i}=p,c=z(p,["active","as","children","className","unsafelyReplaceClassName"]),l=K(i||"sps-nav__item","sps-nav__link",t&&"active");return a.createElement(n,N({className:l},c),s)}Object.assign(mr,{props:_I,displayName:"SpsProductBarTab"});const RI={activeTab:"string",fullWidth:"boolean",onTabChange:"(newTab: string) => void",onProductNameClick:"React.MouseEventHandler",productLogoSrc:"string",productName:"string",productNameHref:"string",tabs:"Array<string>"},LI=G(N({},Y),{activeTab:y.exports.string,fullWidth:y.exports.bool,onTabChange:ne(),onProductNameClick:ne(),productLogoSrc:y.exports.string,productName:y.exports.string,productNameHref:y.exports.string,tabs:y.exports.arrayOf(y.exports.string)});function Pi(e){const k=e,{activeTab:t,children:n,className:s,fullWidth:o,onProductNameClick:i,onTabChange:c,productLogoSrc:l,productName:p,productNameHref:u,tabs:f=[],unsafelyReplaceClassName:m}=k,g=z(k,["activeTab","children","className","fullWidth","onProductNameClick","onTabChange","productLogoSrc","productName","productNameHref","tabs","unsafelyReplaceClassName"]),S=a.useRef(),[w,x]=Vt(n,[{type:mr}]),[C,D]=a.useState(t||f[0]);a.useEffect(()=>{D(t)},[t]);function I(R){D(R),c&&c(R)}const v=K(m||"sps-navbar-container","z-stratum-bar",s);return a.createElement("div",G(N({className:v},g),{ref:S}),a.createElement("nav",{className:K("sps-navbar","sps-navbar--expand-lg",o&&"sps-navbar--full-width")},p||l?a.createElement(a.Fragment,null,a.createElement("a",{className:"sps-navbar__brand",href:u,onClick:i},l&&a.createElement("img",{className:"sps-navbar__brand-logo",src:l,"aria-hidden":"true",alt:`${p} Logo`}),p&&a.createElement("span",{className:"sps-navbar__brand-name"},p)),a.createElement("span",{className:"sps-vertical-rule"})):null,a.createElement("div",{className:"sps-navbar__nav"},f.map(R=>a.createElement("a",{className:K("sps-nav__item","sps-nav__link",R===C&&"active"),key:R,onClick:()=>I(R)},a.createElement("span",null,R),R===C&&a.createElement("span",{className:"sr-only"},"(current)"))),w),a.createElement("div",{className:"sps-navbar__content"},a.createElement(Mt.Provider,{value:{parentElementRef:S,fixed:!0}},x))))}Object.assign(Pi,{props:RI,propTypes:LI,displayName:"SpsProductBar"});const Dm={basic:{label:"Basic",description:T.code`
|
|
6104
6104
|
<p>Product navigation bar</p>
|
|
6105
6105
|
`,examples:{basic:{react:T.code`
|
|
6106
6106
|
function DemoComponent() {
|
|
@@ -6201,7 +6201,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6201
6201
|
</SpsProductBar>
|
|
6202
6202
|
)
|
|
6203
6203
|
}
|
|
6204
|
-
`}}}},OI={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"},BI=
|
|
6204
|
+
`}}}},OI={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"},BI=G(N({},Y),{percentComplete:y.exports.number,title:y.exports.string,detail:y.exports.string,disabled:y.exports.bool,onClose:ne()});function Fi(e){const S=e,{children:t,className:n,detail:s,disabled:o,onClose:i,percentComplete:c,title:l,"data-testid":p,unsafelyReplaceClassName:u}=S,f=z(S,["children","className","detail","disabled","onClose","percentComplete","title","data-testid","unsafelyReplaceClassName"]),{t:m}=a.useContext(Oe),g=K(u||"sps-progress-bar",c===1&&"sps-progress-bar--complete",o&&"sps-progress-bar--disabled",n);return a.createElement("div",N({className:g},f),a.createElement("div",{className:"sps-progress-bar__content"},l&&a.createElement("div",{className:"sps-progress-bar__heading"},a.createElement("div",{className:"sps-progress-bar__title"},l),a.createElement("div",{className:"sps-progress-bar__percentage"},`${Math.floor(c*100)}%`)),a.createElement("div",{className:"sps-progress-bar__bar-background"},a.createElement("div",{className:"sps-progress-bar__bar-progress",style:{width:`${c*100}%`}})),s&&a.createElement("div",{className:"sps-progress-bar__detail"},s)),i&&a.createElement("div",{className:"sps-progress-bar__close-button"},a.createElement(Fe,{kind:_.ButtonKind.ICON,icon:_.SpsIcon.X,onClick:i,title:m("design-system:progressBar.closeButtonTitle")})))}Object.assign(Fi,{props:OI,propTypes:BI,displayName:"SpsProgressBar"});const Im={standard:{label:"Stepped Progress Bar",description:()=>a.createElement(a.Fragment,null,a.createElement("p",null,"Stepped Progress Bars are comprised of the following Required and Optional elements."),a.createElement("img",{src:"assets/images/stepped-progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),a.createElement(Ln,null,a.createElement(fn,null,a.createElement(Qe,null,"Section"),a.createElement(Qe,null,"Content Type"),a.createElement(Qe,null,"Required"),a.createElement(Qe,null,"Description/Guidelines")),a.createElement(hn,null,a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"1")),a.createElement(ae,null,"Title"),a.createElement(ae,null,"No"),a.createElement(ae,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"2")),a.createElement(ae,null,"Progress Meter"),a.createElement(ae,null,"Yes"),a.createElement(ae,null)),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"3")),a.createElement(ae,null,"Progress Counter"),a.createElement(ae,null,"No"),a.createElement(ae,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"4")),a.createElement(ae,null,"Step icons"),a.createElement(ae,null,"No"),a.createElement(ae,{wrap:400},"Icons can be set inside of steps for visual emphasis.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"5")),a.createElement(ae,null,"Step Tooltips"),a.createElement(ae,null,"No"),a.createElement(ae,{wrap:400},"Tooltips can be utilized to provide more details about each specific step. Tooltips can be exposed on click or hover."))))),examples:{standard:{description:()=>a.createElement(a.Fragment,null,a.createElement("h4",null,"Building Stepped Progress Bars"),a.createElement("p",null,"The Stepped Progress Bar is designed to expand to fit the entire width of its container. View the diagram above for rules regarding including or excluding certain elements.")),react:T.code`
|
|
6205
6205
|
function Component() {
|
|
6206
6206
|
const data = [
|
|
6207
6207
|
{index: 0, title: 'Title 1', description: 'Description'},
|
|
@@ -6292,7 +6292,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6292
6292
|
</SpsCard>
|
|
6293
6293
|
)
|
|
6294
6294
|
}
|
|
6295
|
-
`}}}},AI={icon:"SpsIcon",iconSize:"SpsIconSize"},PI=
|
|
6295
|
+
`}}}},AI={icon:"SpsIcon",iconSize:"SpsIconSize"},PI=G(N({},Y),{icon:be(_.SpsIcon),iconSize:be(_.SpsIconSize)});function Ki({icon:e,iconSize:t=_.SpsIconSize.SMALL,children:n}){return a.createElement("div",{className:"sps-tooltip__title-component"},e&&a.createElement(Rt,{icon:e,size:t}),a.createElement("span",{className:"sps-tooltip__title"},n))}Object.assign(Ki,{props:AI,propTypes:PI,displayName:"SpsTooltipTitle"});const Nm={basic:{label:"Basic",description:"Info about basic usage of tooltip",examples:{basic:{description:T.code`
|
|
6296
6296
|
<p>There are two ways to tell the tooltip what to attach to. The first is to
|
|
6297
6297
|
pass in a ref.</p>
|
|
6298
6298
|
`,react:T.code`
|
|
@@ -6686,7 +6686,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6686
6686
|
</React.Fragment>
|
|
6687
6687
|
);
|
|
6688
6688
|
}
|
|
6689
|
-
`}}}},FI={title:"string",stepsCount:"number",completedStepsCount:"number",disabled:"boolean",showStepsCounter:"boolean",color:"SteppedProgressBarColor",data:"SteppedProgressBarData[]"},KI={title:y.exports.string,stepsCount:y.exports.number,completedStepsCount:y.exports.number,disabled:y.exports.bool,showStepsCounter:y.exports.bool,color:be(
|
|
6689
|
+
`}}}},FI={title:"string",stepsCount:"number",completedStepsCount:"number",disabled:"boolean",showStepsCounter:"boolean",color:"SteppedProgressBarColor",data:"SteppedProgressBarData[]"},KI={title:y.exports.string,stepsCount:y.exports.number,completedStepsCount:y.exports.number,disabled:y.exports.bool,showStepsCounter:y.exports.bool,color:be(_.SteppedProgressBarColor),data:y.exports.arrayOf(ce())};function Vi(e){const{title:t,stepsCount:n,completedStepsCount:s=0,disabled:o,showStepsCounter:i,className:c,data:l,color:p=_.SteppedProgressBarColor.PURPLE}=e,u=Array.from(Array(n)).map((m,g)=>N({id:Gn(null).current},l==null?void 0:l.find(S=>S.index===g))),f=K("sps-stepped-progress-bar",`sps-stepped-progress-bar--${p}`,s===n&&"sps-stepped-progress-bar--complete",o&&"sps-stepped-progress-bar--disabled",c);return a.createElement("div",{className:f},a.createElement("div",{className:"sps-stepped-progress-bar__content"},(t||i)&&a.createElement("div",{className:"sps-progress-bar__heading"},t&&a.createElement("div",{className:"sps-progress-bar__title"},t),i&&a.createElement("div",{className:"sps-stepped-progress-bar__percentage"},`${s} of ${n} Complete`)),a.createElement("ul",{className:"sps-stepped-progress-bar__bar-background d-flex align-items-center list-unstyled mb-0"},u.map((m,g)=>a.createElement("li",{id:m.id,key:m.id,className:K("sps-stepped-progress-bar__step",s>g&&!m.skipped&&"sps-stepped-progress-bar__step-complete")},m.icon&&a.createElement(Rt,{icon:m.icon,size:_.SpsIconSize.SMALL,className:K("d-block",m.index>s-1?"gray400":"white")}),m.title&&a.createElement(Dt,{for:m.id,title:m.title},m.description))))))}Object.assign(Vi,{props:FI,propTypes:KI,displayName:"SpsSteppedProgressBar"});const km={general:{label:"General Usage",customSection:()=>a.createElement(a.Fragment,null,a.createElement("h4",null,"General Usage"),a.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."),a.createElement("p",null,"For processes that typically complete within minutes or less, opt for the Standard Progress Bar."),a.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:()=>a.createElement(a.Fragment,null,a.createElement("p",null,"Standard Progress Bars are comprised of the following Required and Optional elements."),a.createElement("img",{src:"assets/images/progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),a.createElement(Ln,null,a.createElement(fn,null,a.createElement(Qe,null,"Section"),a.createElement(Qe,null,"Content Type"),a.createElement(Qe,null,"Required"),a.createElement(Qe,null,"Description/Guidelines")),a.createElement(hn,null,a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"1")),a.createElement(ae,null,"Title"),a.createElement(ae,null,"No"),a.createElement(ae,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"2")),a.createElement(ae,null,"Progress Meter"),a.createElement(ae,null,"Yes"),a.createElement(ae,null)),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"3")),a.createElement(ae,null,"Progress Counter"),a.createElement(ae,null,"No"),a.createElement(ae,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"4")),a.createElement(ae,null,"Clear Button"),a.createElement(ae,null,"No"),a.createElement(ae,{wrap:400},"If the process requires the option to be cancelled or removed from a list the clear button can be used.")),a.createElement(Be,null,a.createElement(ae,null,a.createElement("span",{className:"sps-tag sps-tag--info"},"5")),a.createElement(ae,null,"Progress Details"),a.createElement(ae,null,"No"),a.createElement(ae,{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:()=>a.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:T.code`
|
|
6690
6690
|
function Component() {
|
|
6691
6691
|
function handleClose() {
|
|
6692
6692
|
console.log("closed");
|
|
@@ -6732,7 +6732,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6732
6732
|
</SpsCard>
|
|
6733
6733
|
)
|
|
6734
6734
|
}
|
|
6735
|
-
`}}}},VI={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",inline:"boolean",centered:"boolean",label:"string",name:{type:"string",required:!0},onChange:"ChangeEventHandler",value:"any"},$I=
|
|
6735
|
+
`}}}},VI={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",inline:"boolean",centered:"boolean",label:"string",name:{type:"string",required:!0},onChange:"ChangeEventHandler",value:"any"},$I=G(N({},Y),{checked:y.exports.bool,disabled:y.exports.bool,formControl:ce(),formMeta:ce(),inline:y.exports.bool,centered:y.exports.bool,label:y.exports.string,name:y.exports.string.isRequired,onChange:ne(),ref:Ft(),value:y.exports.any});function $i(C){var D=C,{checked:e,className:t,"data-testid":n,disabled:s,formControl:o,formMeta:i,id:c,inline:l,centered:p,label:u,name:f,onChange:m,ref:g,unsafelyReplaceClassName:S,value:w}=D,x=z(D,["checked","className","data-testid","disabled","formControl","formMeta","id","inline","centered","label","name","onChange","ref","unsafelyReplaceClassName","value"]);const I=i||o,v=a.useRef(),{wrapperId:k,controlId:R}=Tt(c),B=K(S||"sps-radio-button","sps-checkable",l&&"sps-checkable--inline",p&&"sps-checkable--centered",!u&&"sps-checkable--no-label",t);function M(L){I&&(I.setValue(w),I.markAsDirty()),m&&m(L),v.current.focus()}return a.createElement(it,{id:k,className:B,formControl:o,formMeta:i,inputRef:v,ref:g,"data-testid":`${n}`,onClick:()=>v.current.click()},a.createElement("input",N({type:"radio",ref:v,className:"sps-checkable__input","data-testid":`${n}__radio-input`,id:R,name:f,checked:e,disabled:s,onChange:M},x)),a.createElement("label",{className:"sps-checkable__label",htmlFor:R},u||""))}Object.assign($i,{props:VI,propTypes:$I,displayName:"SpsRadioButton"});const Mm={general:{label:"General Usage",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Use Radio Buttons:"),a.createElement("ul",null,a.createElement("li",null,"When only one option can be selected from the available options.")),a.createElement("h5",null,"Do Not Use Radio Buttons:"),a.createElement("ul",null,a.createElement("li",null,"When a selection causes an immediate change in the system. Use a"," ",a.createElement(e,{to:"toggle"},"Toggle")," instead."),a.createElement("li",null,"When multiple options can be selected from the available options. Use"," ",a.createElement(e,{to:"checkbox"},"Checkboxes")," instead."),a.createElement("li",null,"When the list of available options requires too much space to list efficiently. Use"," ",a.createElement(e,{to:"dropdown"},"Dropdown")," instead.")),a.createElement("h5",null,"Using Radio Buttons in a Form"),a.createElement("p",null,"Reference the ",a.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Radio Buttons in Form Layouts."))},basic:{label:"Basic Radio Buttons",description:()=>a.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:()=>a.createElement("h4",null,"Horizontal Group"),react:T.code`
|
|
6736
6736
|
function DemoComponent() {
|
|
6737
6737
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
6738
6738
|
option: "option1",
|
|
@@ -7231,7 +7231,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7231
7231
|
</SpsForm>
|
|
7232
7232
|
);
|
|
7233
7233
|
}
|
|
7234
|
-
`}}}},HI={maxHeight:"string"},WI=
|
|
7234
|
+
`}}}},HI={maxHeight:"string"},WI=G(N({},Y),{maxHeight:y.exports.string});function Hi(e){const{children:t,maxHeight:n}=e;return a.createElement("div",{className:"sps-scrollable-container",style:{maxHeight:n}},t)}Object.assign(Hi,{props:HI,propTypes:WI,displayName:"SpsScrollableContainer"});const _m={basic:{label:"Basic",description:"basic scrollable container",examples:{text:{jsx:T.code`
|
|
7235
7235
|
<SpsCard>
|
|
7236
7236
|
<SpsScrollableContainer maxHeight='100px'>
|
|
7237
7237
|
<p>
|
|
@@ -7294,7 +7294,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7294
7294
|
</SpsScrollableContainer>
|
|
7295
7295
|
</SpsCard>
|
|
7296
7296
|
}
|
|
7297
|
-
`}}}},Rm={general:{label:"General Usage",description:({NavigateTo:e})=>
|
|
7297
|
+
`}}}},Rm={general:{label:"General Usage",description:({NavigateTo:e})=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h5",null,"Use a Select:"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"When a list of predetermined values can be provided.")),P.default.createElement("h5",null,"Do Not Use a Select:"),P.default.createElement("ul",null,P.default.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",P.default.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",P.default.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead."),P.default.createElement("li",{className:"mb-2"},"When it is ideal to display all available options without requiring a click. Consider"," ",P.default.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",P.default.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead.")),P.default.createElement("h5",null,"Using Selects in a Form"),P.default.createElement("p",null,"Reference the ",P.default.createElement(e,{to:"form"},"Forms")," page for guidelines for placing inputs in Form layouts"))},basic:{label:"Basic Select",description:()=>P.default.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:T.code`
|
|
7298
7298
|
function DemoComponent() {
|
|
7299
7299
|
const colors = ["red", "blue", "green"];
|
|
7300
7300
|
|
|
@@ -7307,7 +7307,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7307
7307
|
</div>
|
|
7308
7308
|
)
|
|
7309
7309
|
}
|
|
7310
|
-
`},placeholderText:{description:()=>
|
|
7310
|
+
`},placeholderText:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Customizable Placeholder Text"),P.default.createElement("p",null,"Placeholder text can be customized to specifically reference the content in the dropdown menu.")),react:T.code`
|
|
7311
7311
|
function DemoComponent() {
|
|
7312
7312
|
const colors = ["red", "blue", "green"];
|
|
7313
7313
|
|
|
@@ -7320,7 +7320,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7320
7320
|
</div>
|
|
7321
7321
|
)
|
|
7322
7322
|
}
|
|
7323
|
-
`},defaultSelection:{description:()=>
|
|
7323
|
+
`},defaultSelection:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Default Selection / No Clear Button"),P.default.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:T.code`
|
|
7324
7324
|
function DemoComponent() {
|
|
7325
7325
|
const colors = ["Small", "Medium", "Large"];
|
|
7326
7326
|
|
|
@@ -7333,7 +7333,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7333
7333
|
</div>
|
|
7334
7334
|
)
|
|
7335
7335
|
}
|
|
7336
|
-
`},zeroState:{description:()=>
|
|
7336
|
+
`},zeroState:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Zero State / No Available Options"),P.default.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:T.code`
|
|
7337
7337
|
function DemoComponent() {
|
|
7338
7338
|
|
|
7339
7339
|
return (
|
|
@@ -7345,7 +7345,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7345
7345
|
</div>
|
|
7346
7346
|
)
|
|
7347
7347
|
}
|
|
7348
|
-
`},formHooks:{description:({NavigateTo:e})=>
|
|
7348
|
+
`},formHooks:{description:({NavigateTo:e})=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Form Hooks"),P.default.createElement("p",null,"The ",P.default.createElement("code",null,"formMeta")," and ",P.default.createElement("code",null,"formValue")," props are used with the"," ",P.default.createElement("code",null,"useSpsForm")," hook. By using the ",P.default.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 ",P.default.createElement(e,{to:"form"},"Forms")," page.")),react:T.code`
|
|
7349
7349
|
function DemoComponent() {
|
|
7350
7350
|
const colors = ["red", "blue", "green"];
|
|
7351
7351
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -7361,7 +7361,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7361
7361
|
</div>
|
|
7362
7362
|
)
|
|
7363
7363
|
}
|
|
7364
|
-
`}}},filter:{label:"Select with Filter",description:()=>
|
|
7364
|
+
`}}},filter:{label:"Select with Filter",description:()=>P.default.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:T.code`
|
|
7365
7365
|
function DemoComponent() {
|
|
7366
7366
|
function colorSearch(search) {
|
|
7367
7367
|
return ["red", "orange", "yellow", "green", "blue", "indigo", "violet"].filter(s => (new RegExp(search, "i")).test(s));
|
|
@@ -7376,7 +7376,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7376
7376
|
</div>
|
|
7377
7377
|
)
|
|
7378
7378
|
}
|
|
7379
|
-
`},promise:{description:()=>
|
|
7379
|
+
`},promise:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Return a Promise"),P.default.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:T.code`
|
|
7380
7380
|
function DemoComponent() {
|
|
7381
7381
|
function colorSearch(search) {
|
|
7382
7382
|
return new Promise((resolve, reject) => {
|
|
@@ -7394,7 +7394,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7394
7394
|
</div>
|
|
7395
7395
|
)
|
|
7396
7396
|
}
|
|
7397
|
-
`},debounce:{description:()=>
|
|
7397
|
+
`},debounce:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Debounce"),P.default.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:T.code`
|
|
7398
7398
|
function DemoComponent() {
|
|
7399
7399
|
function colorSearch(search) {
|
|
7400
7400
|
return ["red", "orange", "yellow", "green", "blue", "indigo", "violet"].filter(s => new RegExp(search, "i").test(s));
|
|
@@ -7409,7 +7409,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7409
7409
|
</div>
|
|
7410
7410
|
)
|
|
7411
7411
|
}
|
|
7412
|
-
`}}},objectOptions:{label:"Object Options",description:()=>
|
|
7412
|
+
`}}},objectOptions:{label:"Object Options",description:()=>P.default.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:T.code`
|
|
7413
7413
|
function DemoComponent() {
|
|
7414
7414
|
const sizes = [
|
|
7415
7415
|
{ size: "S", price: "10.99" },
|
|
@@ -7426,7 +7426,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7426
7426
|
</div>
|
|
7427
7427
|
)
|
|
7428
7428
|
}
|
|
7429
|
-
`},extendedDetails:{description:()=>
|
|
7429
|
+
`},extendedDetails:{description:()=>P.default.createElement(P.default.Fragment,null,P.default.createElement("h4",null,"Extended Details"),P.default.createElement("p",null,"Extended details can be displayed in the dropdown menu. Only the primary detail is displayed as the selection.")),react:T.code`
|
|
7430
7430
|
function DemoComponent() {
|
|
7431
7431
|
const sizes = [
|
|
7432
7432
|
{ size: "S", price: "10.99" },
|
|
@@ -7442,7 +7442,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7442
7442
|
</div>
|
|
7443
7443
|
)
|
|
7444
7444
|
}
|
|
7445
|
-
`}}},selectWithAction:{label:"Select with Action Button",description:()=>
|
|
7445
|
+
`}}},selectWithAction:{label:"Select with Action Button",description:()=>P.default.createElement("p",null,"A Text Button can be added to the bottom of the dropdown menu to provide a specific action."),examples:{basic:{react:T.code`
|
|
7446
7446
|
function DemoComponent() {
|
|
7447
7447
|
const colors = ["red", "blue", "green"];
|
|
7448
7448
|
const [action, updateAction] = useSpsAction(
|
|
@@ -7467,7 +7467,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7467
7467
|
</div>
|
|
7468
7468
|
)
|
|
7469
7469
|
}
|
|
7470
|
-
`}}},disabled:{label:"Disabled State",description:()=>
|
|
7470
|
+
`}}},disabled:{label:"Disabled State",description:()=>P.default.createElement("p",null,"In the disabled state, select inputs display the current selection or placeholder text, but cannot be interacted with."),examples:{basic:{react:T.code`
|
|
7471
7471
|
function DemoComponent() {
|
|
7472
7472
|
const colors = ["red", "blue", "green"];
|
|
7473
7473
|
|
|
@@ -7480,7 +7480,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7480
7480
|
</div>
|
|
7481
7481
|
)
|
|
7482
7482
|
}
|
|
7483
|
-
`}}}},Lm=({branch:e,setActiveBranch:t,activeBranch:n})=>{const[s,o]
|
|
7483
|
+
`}}}},Lm=({branch:e,setActiveBranch:t,activeBranch:n})=>{const[s,o]=H.useState(e.expanded||!1);return a.createElement("ul",{className:K("sps-side-nav__branch",e.name===n&&"sps-side-nav__branch--active")},a.createElement("li",{className:K("sps-side-nav__leaf",e.name===n&&"sps-side-nav__leaf--active")},a.createElement("span",{className:"sps-side-nav__link",onClick:()=>{o(!s),e.subNavItems||t(e.name,e.key)},onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.stopPropagation(),i.preventDefault(),o(!s),e.subNavItems||t(e.name,e.key))},role:"tab",tabIndex:0,"aria-selected":e.name===n},e.subNavItems&&a.createElement("i",{className:K("sps-icon sps-side-nav__toggle",s?"sps-icon-chevron-down":"sps-icon-chevron-right")}),a.createElement("span",{className:"sps-side-nav__link-title"},e.icon&&a.createElement("i",{className:`sps-icon sps-icon-${e.icon} mr-2`}),e.name),a.createElement("div",{className:"sps-side-nav__link-tag",style:{marginTop:"-2px"}},e.tag&&a.createElement("span",{className:`sps-tag sps-tag--${e.tag}`},e.tagContent))),e.subNavItems&&s&&e.subNavItems.map(i=>{var c;return a.createElement(Lm,{branch:G(N({},i),{expanded:fr(i.subNavItems,n)}),setActiveBranch:t,activeBranch:n,key:(c=i.key)!=null?c:i.name})})))},fr=(e,t)=>e?e.some(n=>n.name===t)||e.some(n=>fr(n.subNavItems,t)):!1,Om=({title:e,titleIcon:t,navOptions:n,onNavChange:s,activeNavItem:o,tabs:i,onTabChange:c,initialActiveTab:l,filterable:p,filterInputPlaceholder:u})=>{const f=H.useRef(o),[m,g]=H.useState(o),[S,w]=H.useState(l||i&&i[0]),[x,C]=H.useState(""),D=(R,B)=>{g(R),s&&s(R,B)},I=R=>{w(R),c&&c(R)},v=R=>R?R.some(B=>B.name.toLowerCase().includes(x))||R.some(B=>v(B.subNavItems)):!1,k=n.map(R=>G(N({},R),{navItems:R.navItems.filter(B=>B.name.toLowerCase().includes(x)||v(B.subNavItems))}));return o!==f.current&&(g(o),f.current=o),a.createElement("div",{className:"sps-side-nav sps-card"},e&&a.createElement("div",{className:"sps-card__header",title:e},a.createElement("div",{className:"sps-card__title"},t&&a.createElement("i",{className:`sps-icon sps-icon-${t}`}),e)),i&&a.createElement("nav",{className:"sps-nav sps-nav--tabs"},i.map(R=>a.createElement("span",{className:K("sps-nav__item","sps-nav__link",R===S&&"active"),"data-toggle":"tab",role:"tab",tabIndex:0,key:R,onClick:()=>I(R),onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.stopPropagation(),B.preventDefault(),I(R))}},a.createElement("span",null,R)))),a.createElement("div",{className:"sps-card__body"},p&&a.createElement("section",{className:"sps-side-nav__section"},a.createElement("div",{className:"sps-text-input"},a.createElement("div",{className:"sps-form-control"},a.createElement("i",{className:"sps-text-input__icon sps-icon sps-icon-filter"}),a.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:u,onChange:R=>{C(R.target.value)}})))),k.map(R=>{var B;return a.createElement("section",{className:"sps-side-nav__section",key:(B=R.key)!=null?B:R.sectionTitle},R.sectionTitle&&a.createElement("div",{className:"sps-side-nav__section-title",style:{fontWeight:400}},R.sectionTitle),R.navItems.map(M=>{var L;return a.createElement(Lm,{branch:G(N({},M),{expanded:fr(M.subNavItems,o)}),activeBranch:m,setActiveBranch:(F,A)=>{D(F,A)},key:(L=M.key)!=null?L:M.name})}))})))},Bm={usage:{label:"Usage",customSection:()=>a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement("span",{className:"sps-body-14 mb-2"},"Use the Side Navigation if:"),a.createElement("ul",{className:"mt-2"},a.createElement("li",{className:"mb-1"},"The navigation benefits from subsections or nested structures"),a.createElement("li",{className:"mb-1"},"There are too many items for Tabbed Navigation"),a.createElement("li",null,"The navigation items have long names"))),a.createElement("div",null,a.createElement("span",{className:"sps-body-14 mb-2"},"Avoid using the Side Navigation if:"),a.createElement("ul",{className:"mt-2"},a.createElement("li",{className:"mb-1"},"Tabbed Navigation is sufficient"),a.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:T.code`
|
|
7484
7484
|
function DemoComponent() {
|
|
7485
7485
|
function onChange(selection) {
|
|
7486
7486
|
console.log(selection);
|
|
@@ -7791,7 +7791,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7791
7791
|
</div>
|
|
7792
7792
|
);
|
|
7793
7793
|
}
|
|
7794
|
-
`}}}},GI={sortKey:"string",sortDisabled:"boolean",sort:"SortedColumn[]",onSortChange:"SortChangeHandler",widthPx:"number",widthRem:"number"},UI=
|
|
7794
|
+
`}}}},GI={sortKey:"string",sortDisabled:"boolean",sort:"SortedColumn[]",onSortChange:"SortChangeHandler",widthPx:"number",widthRem:"number"},UI=N({sortKey:y.exports.string,sortDisabled:y.exports.bool,sort:y.exports.arrayOf(ce()),onSortChange:ne(),widthPx:y.exports.number,widthRem:y.exports.number},Y);function Ka(S){var w=S,{className:e,"data-testid":t,unsafelyReplaceClassName:n,sortKey:s,sort:o,sortDisabled:i,onSortChange:c,onClick:l,children:p,widthPx:u,widthRem:f,style:m}=w,g=z(w,["className","data-testid","unsafelyReplaceClassName","sortKey","sort","sortDisabled","onSortChange","onClick","children","widthPx","widthRem","style"]);const x=a.useMemo(()=>{const v=!!s&&!i&&Array.isArray(o)&&o.find(k=>k.key===s);return v?v.direction:void 0},[o,s,i]),C=K(n||"sps-sorting-header__cell",x===_.SortDirection.ASCENDING&&"sps-sorting-header__cell--sorted-asc",x===_.SortDirection.DESCENDING&&"sps-sorting-header__cell--sorted-desc",i&&"sps-sorting-header__cell--sort-disabled",e),D=u?u/16:f,I=D?G(N({},m),{width:`${D}rem`}):m;return a.createElement("div",N({className:C,onClick:v=>{s&&!i&&c([{key:s,direction:x===_.SortDirection.ASCENDING?_.SortDirection.DESCENDING:_.SortDirection.ASCENDING}]),l&&l(v)},"data-testid":t,style:I},g),p)}Object.assign(Ka,{props:GI,propTypes:UI,displayName:"SpsSortingHeaderCell"});const YI={sort:"SortedColumn[]",onSortChange:"SortChangeHandler"},zI=G(N({},Y),{sort:y.exports.arrayOf(ce()),onSortChange:ne()});function hr(l){var p=l,{className:e,"data-testid":t,unsafelyReplaceClassName:n,sort:s,onSortChange:o,children:i}=p,c=z(p,["className","data-testid","unsafelyReplaceClassName","sort","onSortChange","children"]);const u=K(n||"sps-sorting-header",e),f={sort:s,onSortChange:o};return a.createElement("div",N({className:u},c),a.Children.map(i,m=>m&&a.isValidElement(m)&&m.type===Ka?a.cloneElement(m,f):m))}Object.assign(hr,{props:YI,propTypes:zI,displayName:"SpsSortingHeader"});const Am={basic:{examples:{small:{react:T.code`
|
|
7795
7795
|
function Component() {
|
|
7796
7796
|
return (
|
|
7797
7797
|
<SpsSpinner size={SpinnerSize.SMALL} title="Please wait…" />
|
|
@@ -7812,7 +7812,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7812
7812
|
<SpsSpinner size={SpinnerSize.LARGE} alt="Loading content…" />
|
|
7813
7813
|
);
|
|
7814
7814
|
}
|
|
7815
|
-
`}}}},jI={disabled:"boolean",href:"string",label:"string",icon:"SpsIcon",kind:"StdButtonKind",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>"},qI=
|
|
7815
|
+
`}}}},jI={disabled:"boolean",href:"string",label:"string",icon:"SpsIcon",kind:"StdButtonKind",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>"},qI=G(N({},Y),{disabled:y.exports.bool,href:y.exports.string,label:y.exports.string,icon:be(_.SpsIcon),kind:be(_.StdButtonKind),options:y.exports.arrayOf(y.exports.oneOfType([y.exports.func,y.exports.any]))});function Wi(e){const D=e,{children:t,className:n,"data-testid":s,disabled:o,href:i,label:c,options:l,icon:p,kind:u=_.StdButtonKind.DEFAULT,unsafelyReplaceClassName:f}=D,m=z(D,["children","className","data-testid","disabled","href","label","options","icon","kind","unsafelyReplaceClassName"]),[g,S]=a.useState(!1),w=()=>{S(!0)},x=()=>{S(!1)},C=K(f||"sps-split-button",`sps-split-button--${u}`,g&&"sps-split-button--open",n);return a.createElement("div",N({className:C,"data-testid":s},m),a.createElement(Fe,{kind:u,icon:p,href:i,disabled:o},c),a.createElement(xn,{kind:u,options:l,disabled:o,onOpen:w,onClose:x}))}Object.assign(Wi,{props:jI,propTypes:qI,displayName:"SpsSplitButton"});const Pm={kinds:{label:"Regular Split Buttons",description:T.code`<p>info about split buttons</p>`,examples:{basic:{description:T.code`<p>Basic</p>`,jsx:T.code`
|
|
7816
7816
|
<React.Fragment>
|
|
7817
7817
|
<SpsSplitButton id="withIcon" label="Default Button"
|
|
7818
7818
|
options={[
|
|
@@ -7878,7 +7878,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7878
7878
|
]} className="mr-1">
|
|
7879
7879
|
</SpsSplitButton>
|
|
7880
7880
|
</React.Fragment>
|
|
7881
|
-
`}}}},JI={channelId:{type:"string",required:!0}},ZI=
|
|
7881
|
+
`}}}},JI={channelId:{type:"string",required:!0}},ZI=G(N({},Y),{channelId:y.exports.string.isRequired});function Gi(e){const l=e,{channelId:t,className:n,unsafelyReplaceClassName:s}=l,o=z(l,["channelId","className","unsafelyReplaceClassName"]),{t:i}=a.useContext(Oe),c=K(s||"sps-slack-link",n);return a.createElement("a",N({className:c,target:"_blank",rel:"noreferrer",href:`https://spscommerce.slack.com/archives/${t}`},o),a.createElement("i",{className:`sps-icon sps-icon-${_.SpsIcon.CONVERSATION}`,"aria-hidden":"true"}),a.createElement("span",null,i("design-system:slackLink.label")))}Object.assign(Gi,{props:JI,propTypes:ZI,displayName:"SpsSlackLink"});const Fm={basic:{examples:{basic:{react:T.code`
|
|
7882
7882
|
function DemoComponent() {
|
|
7883
7883
|
return (
|
|
7884
7884
|
<SpsProductBar productName="My Product"
|
|
@@ -7890,7 +7890,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7890
7890
|
><SpsSlackLink channelId="CELEGDK4Y" /></SpsProductBar>
|
|
7891
7891
|
);
|
|
7892
7892
|
}
|
|
7893
|
-
`}}}},XI={},QI=
|
|
7893
|
+
`}}}},XI={},QI=N({},Y);function Va(e){const l=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName"]),c=K(o||"sps-content-row__expansion",n);return a.createElement("div",G(N({className:c},i),{"data-testid":`${s}__expansion`}),t)}Object.assign(Va,{props:XI,propTypes:QI,displayName:"SpsSummaryListExpansion"});const eN={expanded:"boolean",selected:"boolean",onToggle:"(isExpanded: boolean) => void"},tN=G(N({},Y),{expanded:y.exports.bool,selected:y.exports.bool,onToggle:ne()});function Ui(e){const D=e,{children:t,className:n,expanded:s,onToggle:o,selected:i,"data-testid":c,unsafelyReplaceClassName:l}=D,p=z(D,["children","className","expanded","onToggle","selected","data-testid","unsafelyReplaceClassName"]),[u,f]=Kt({isExpanded:s,expandable:!1});a.useEffect(()=>{const I=a.Children.toArray(t).some(v=>a.isValidElement(v)&&v.type===Va);f({expandable:I})},[]);function m(){const I=!u.isExpanded;f({isExpanded:I}),o&&o(I)}function g(I){I.stopPropagation(),m()}function S(I){(I.key==="Enter"||I.key===" "||I.key==="Spacebar")&&(I.preventDefault(),I.stopPropagation(),m())}const w=K(l||"sps-summary-list-row","sps-content-row",u.expandable&&"sps-summary-list-row--expandable",u.isExpanded&&"sps-content-row--expanded",i&&"sps-summary-list-row--selected",n),[x,C]=Vt(t,[{type:Va}]);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(" ")),a.createElement("div",N({className:w,"data-testid":c},p),a.createElement("div",{className:"sps-content-row__col-group","data-testid":`${c}__col-group`,onClick:g,onKeyDown:S,tabIndex:0},C),x)}Object.assign(Ui,{props:eN,propTypes:tN,displayName:"SpsSummaryListRow"});const nN={borderless:"boolean",lean:"boolean",leaner:"boolean",width:"string"},aN=G(N({},Y),{borderless:y.exports.bool,lean:y.exports.bool,leaner:y.exports.bool,width:y.exports.string});function Yi(e){const m=e,{className:t,children:n,borderless:s,lean:o,leaner:i,"data-testid":c,unsafelyReplaceClassName:l,width:p}=m,u=z(m,["className","children","borderless","lean","leaner","data-testid","unsafelyReplaceClassName","width"]),f=K(l||"sps-content-row__col",o&&"sps-content-row__col--lean",i&&"sps-content-row__col--leaner",s&&"sps-content-row__col--borderless",t);return a.createElement("div",G(N({className:f,style:{width:p}},u),{"data-testid":`${c}__col`}),n)}Object.assign(Yi,{props:nN,propTypes:aN,displayName:"SpsSummaryListColumn"});const Km={basic:{label:"Basic Usage",examples:{basic:{jsx:T.code`
|
|
7894
7894
|
<>
|
|
7895
7895
|
<SpsSummaryListRow>
|
|
7896
7896
|
<SpsSummaryListColumn width="2.8rem" lean>
|
|
@@ -8140,7 +8140,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8140
8140
|
</SpsSummaryListRow>
|
|
8141
8141
|
);
|
|
8142
8142
|
}
|
|
8143
|
-
`}}}},sN={tasks:"ReactSpsTask[]",taskQueuePosition:"Position",notificationText:"string",tooltipConfig:"{ position: Position, kind: TooltipKind }",onClose:"() => void",onOpen:"() => void",onClearCompleted:"() => void",suppressTooltips:"boolean"},rN=
|
|
8143
|
+
`}}}},sN={tasks:"ReactSpsTask[]",taskQueuePosition:"Position",notificationText:"string",tooltipConfig:"{ position: Position, kind: TooltipKind }",onClose:"() => void",onOpen:"() => void",onClearCompleted:"() => void",suppressTooltips:"boolean"},rN=G(N({},Y),{tasks:y.exports.arrayOf(y.exports.any),taskQueuePosition:be(_.Position),notificationText:y.exports.string,tooltipConfig:y.exports.shape({position:be(_.Position),kind:be(_.TooltipKind)}),onClose:ne(),onOpen:ne(),onClearCompleted:ne(),suppressTooltips:y.exports.bool});function zi(g){var S=g,{tasks:e=[],taskQueuePosition:t=_.Position.BOTTOM_RIGHT,notificationText:n,tooltipConfig:s={},onOpen:o,onClose:i,onClearCompleted:c,className:l,"data-testid":p,unsafelyReplaceClassName:u,suppressTooltips:f=!1}=S,m=z(S,["tasks","taskQueuePosition","notificationText","tooltipConfig","onOpen","onClose","onClearCompleted","className","data-testid","unsafelyReplaceClassName","suppressTooltips"]);const{t:w}=a.useContext(Oe),x=!!e.length,[C,D]=a.useState(!1),[I,v]=a.useState(x),k=a.useRef(null),R=a.useRef(null),B=a.useCallback(()=>{D(!1),i&&i()},[]);a.useEffect(()=>{C?window.addEventListener("resize",B):window.removeEventListener("resize",B)},[C]);const M=zn("sps-task-queue-portal"),L=a.useContext(Mt),[F]=C?Cn(R,k,t,N({altPosition:t},L)):[{},!1],A=s.position||_.Position.BOTTOM_RIGHT,$=s.kind||_.TooltipKind.DEFAULT,V=e.filter(te=>te.unread).length,W=e.filter(te=>te.status===_.SpsTaskStatus.IN_PROGRESS).length,pe=e.some(te=>te.status===_.SpsTaskStatus.COMPLETED||te.status===_.SpsTaskStatus.ERRORED),me=a.useRef(i);me.current=i;const re=a.useRef(),se=()=>{x&&!C?(D(!0),o&&o()):C&&(D(!1),i&&i()),re.current.scrollTop=0},j=te=>te.status===_.SpsTaskStatus.IN_PROGRESS?_.SpsTaskStatusIcons[te.status]:`sps-icon sps-icon-${_.SpsTaskStatusIcons[te.status]}`;a.useEffect(()=>{C&&!x&&(D(!1),me.current&&me.current())},[C,x]);const Z=a.useRef();a.useEffect(()=>{V>0?(v(!0),Z.current&&window.clearTimeout(Z.current),Z.current=window.setTimeout(()=>{Z.current=void 0,v(!1)},_.TASK_QUEUE_NOTIFICATION_DURATION_MS)):(Z.current&&(window.clearTimeout(Z.current),Z.current=void 0),v(!1))},[V]),a.useEffect(()=>{const te=()=>{D(X=>(X&&me.current&&me.current(),!1))};return document.addEventListener("click",te),()=>{document.removeEventListener("click",te)}},[]),a.useEffect(()=>()=>{Z.current&&window.clearTimeout(Z.current)},[]);const oe=K(u||"sps-task-queue",C&&"sps-task-queue--open",C&&"z-stratum-dropdown",!x&&"sps-task-queue--no-tasks",l);function ee(te){return te.actions.map(X=>{if(a.isValidElement(X)){if(X.type!==Fe||X.props.kind!==_.ButtonKind.ICON)throw new Error("Task queue task action must be a config object or an SpsButton of kind ICON");return X}return a.createElement("div",{key:X.icon,className:"sps-button sps-button--icon"},a.createElement("button",{type:"button",title:X.label,disabled:X.disabled,onClick:()=>{X.onClick&&X.onClick(te)}},X.caption,X.icon&&a.createElement("i",{className:`sps-icon sps-icon-${X.icon}`,"aria-hidden":"true"})))})}return a.createElement("div",N({className:oe,onClick:te=>{te.nativeEvent.stopImmediatePropagation()},"data-testid":p},m),a.createElement("button",{type:"button",ref:k,className:"sps-task-queue__button",title:"Task Queue",onClick:se},!!V&&a.createElement("span",{className:"sps-tag sps-tag--info"},V),W?a.createElement("span",{className:"sps-spinner sps-spinner--small"}):a.createElement("i",{className:"sps-icon sps-icon-list","aria-hidden":"true"})),a.createElement(Dt,{for:k,position:A,kind:$,showOn:x?_.TooltipShowTrigger.MANUAL:_.TooltipShowTrigger.MOUSEOVER,isShown:I&&!C?exports.TooltipVisibility.VISIBLE:exports.TooltipVisibility.HIDDEN,hideDelay:Number(x)&&_.TASK_QUEUE_NOTIFICATION_DURATION_MS},!f&&I&&(n||w("design-system:taskQueue.newTask")),!f&&!I&&!x&&w("design-system:taskQueue.noTasks")),M(a.createElement("div",{ref:R,className:K("sps-task-queue__task-list",C&&"sps-task-queue__task-list--open","z-stratum-dropdown"),style:F},a.createElement("div",{ref:re,className:"sps-task-queue__task-list-tasks"},e.map((te,X)=>a.createElement("div",{key:X,className:K("sps-task-queue__task",te.unread&&"sps-task-queue__task--unread")},a.createElement("i",{className:j(te)}),a.createElement("div",{className:"sps-task-queue__task-description"},a.createElement("div",{className:"sps-task-queue__task-heading"},te.heading),te.subheading&&a.createElement("div",{className:"sps-task-queue__task-subheading",title:te.subheading},te.subheading)),te.actions&&!!te.actions.length&&a.createElement("div",{className:"sps-task-queue__task-actions"},ee(te))))),pe&&c&&a.createElement("div",{className:"sps-task-queue__footer"},a.createElement("div",{className:"sps-button sps-button--link"},a.createElement("button",{type:"button",onClick:c},w("design-system:taskQueue.clearCompleted")))))))}Object.assign(zi,{props:sN,propTypes:rN,displayName:"SpsTaskQueue"});const Vm={inProgress:{label:"Task Queue in progress",description:"<p>Info about Task Queue</p>",examples:{inProgress:{react:T.code`
|
|
8144
8144
|
function SpsTaskQueueInProgress() {
|
|
8145
8145
|
const [tasks, setTasks] = React.useState([
|
|
8146
8146
|
{
|
|
@@ -8420,7 +8420,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8420
8420
|
</div>
|
|
8421
8421
|
);
|
|
8422
8422
|
}
|
|
8423
|
-
`}}}},oN={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",name:"string",onChange:"ChangeEventHandler<HTMLInputElement>",placeholder:"string",value:"string",additionalText:"string"},iN=
|
|
8423
|
+
`}}}},oN={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",name:"string",onChange:"ChangeEventHandler<HTMLInputElement>",placeholder:"string",value:"string",additionalText:"string"},iN=G(N({},Y),{disabled:y.exports.bool,formControl:ce(),formMeta:ce(),icon:be(_.SpsIcon),name:y.exports.string,onChange:ne(),placeholder:y.exports.string,value:y.exports.string,additionalText:y.exports.string}),gr=a.forwardRef((C,x)=>{var D=C,{className:e,disabled:t=!1,formControl:n,formMeta:s,icon:o,id:i,name:c,onChange:l,placeholder:p,"data-testid":u,title:f,unsafelyReplaceClassName:m,value:g="",additionalText:S}=D,w=z(D,["className","disabled","formControl","formMeta","icon","id","name","onChange","placeholder","data-testid","title","unsafelyReplaceClassName","value","additionalText"]);const I=s||n,{wrapperId:v,controlId:k}=Tt(i,I),R=a.useRef();function B(A,$){I&&(I.setValue(A),I.markAsDirty()),l&&l($||new on(R.current))}function M(){R.current.value="",B("")}function L(A){B(A.target.value,A)}const F=K(m||"sps-text-input",e);return a.createElement(it,{id:v,className:F,formControl:n,formMeta:s,inputRef:R,ref:x,focusInputOnClick:!0,"data-testid":`${u}`},a.createElement("div",{className:K("sps-form-control",t&&"disabled")},o&&a.createElement("i",{className:K("sps-text-input__icon","sps-icon",`sps-icon-${o}`)}),a.createElement("input",N({type:"text",ref:R,"data-testid":`${u}__input`,className:"sps-text-input__input",id:k,name:c,placeholder:p,onChange:L,title:f,value:g,disabled:t},w)),g&&!t&&a.createElement("i",{"data-testid":`${u}__input_clear`,className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:M})),S&&a.createElement("p",{className:"sps-input__additional-text"},S))});Object.assign(gr,{props:oN,propTypes:iN,displayName:"SpsTextInput"});const $m={general:{label:"General Usage",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Use a Text Input:"),a.createElement("ul",null,a.createElement("li",null,"When the value required is short (a single word or short phrase)."),a.createElement("li",null,"When only one value is required or accepted.")),a.createElement("h5",null,"Do Not Use a Text Input:"),a.createElement("ul",null,a.createElement("li",null,"When a value of considerable length (such as a sentence or paragraph) is required or accepted. Use a ",a.createElement(e,{to:"text-areas"},"Text Area")," instead."),a.createElement("li",null,"When more than one value is required or accepted in the field. Use"," ",a.createElement(e,{to:"multi-select"},"Multi-Select")," instead."),a.createElement("li",null,"When a boolean selection is required (such as on/off, yes/no, etc). Use"," ",a.createElement(e,{to:"checkbox"},"Checkboxes"),","," ",a.createElement(e,{to:"radio-buttons"},"Radio Buttons")," or"," ",a.createElement(e,{to:"toggle"},"Toggles")," instead.")),a.createElement("h5",null,"Using Text Inputs in a Form"),a.createElement("p",null,"Reference the ",a.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Inputs in Form Layouts."))},basic:{label:"Basic Text Inputs",description:()=>a.createElement("p",null,"Basic Text Inputs include a label and an input field."),examples:{standard:{react:T.code`
|
|
8424
8424
|
function DemoComponent() {
|
|
8425
8425
|
const { formValue, formMeta, updateForm } = useSpsForm({ companyName: "" });
|
|
8426
8426
|
|
|
@@ -8487,7 +8487,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8487
8487
|
</div>
|
|
8488
8488
|
);
|
|
8489
8489
|
}
|
|
8490
|
-
`}}}},lN={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",name:"string",onChange:"ChangeEventHandler",placeholder:"string",rows:"number",value:"string",additionalText:"string"},cN=
|
|
8490
|
+
`}}}},lN={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",name:"string",onChange:"ChangeEventHandler",placeholder:"string",rows:"number",value:"string",additionalText:"string"},cN=G(N({},Y),{disabled:y.exports.bool,formControl:ce(),formMeta:ce(),name:y.exports.string,onChange:ne(),placeholder:y.exports.string,ref:Ft(),rows:y.exports.number,value:y.exports.string,additionalText:y.exports.string});function ji(x){var C=x,{className:e,disabled:t=!1,formControl:n,formMeta:s,id:o,name:i,onChange:c,placeholder:l="",ref:p,rows:u=2,"data-testid":f,unsafelyReplaceClassName:m,value:g="",additionalText:S}=C,w=z(C,["className","disabled","formControl","formMeta","id","name","onChange","placeholder","ref","rows","data-testid","unsafelyReplaceClassName","value","additionalText"]);const D=s||n,{wrapperId:I,controlId:v}=Tt(o,D),k=a.useRef();function R(F,A){D&&(D.setValue(F),D.markAsDirty()),c&&c(A||new on(k.current))}function B(){k.current.value="",R("")}function M(F){R(F.target.value,F)}const L=K(m||"sps-textarea",e);return a.createElement(it,{id:I,className:L,formControl:n,formMeta:s,inputRef:k,ref:p,"data-testid":f},a.createElement("div",{className:"position-relative"},a.createElement("textarea",N({ref:k,rows:u,"data-testid":`${f}__input`,className:"sps-form-control input--clearable",id:v,name:i,placeholder:l,onChange:M,"aria-label":l,value:g||"",disabled:t},w)),g&&!t&&a.createElement("i",{"data-testid":`${f}__input_clear`,className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:B})),S&&a.createElement("p",{className:"sps-input__additional-text"},S))}Object.assign(ji,{props:lN,propTypes:cN,displayName:"SpsTextarea"});const Hm={general:{label:"General Usage",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Use a Text Area:"),a.createElement("ul",null,a.createElement("li",null,"When a value of considerable length (such as a sentence or paragraph) is required or accepted.")),a.createElement("h5",null,"Do Not Use a Text Area:"),a.createElement("ul",null,a.createElement("li",null,"When the value required is short (a single word or short phrase). Use a"," ",a.createElement(e,{to:"text-inputs"},"Text Input")," instead."),a.createElement("li",null,"When more than one value is required or accepted in the field. Use"," ",a.createElement(e,{to:"multi-select"},"Multi-Select")," instead."),a.createElement("li",null,"When a boolean selection is required (such as on/off, yes/no, etc). Use"," ",a.createElement(e,{to:"checkbox"},"Checkboxes"),","," ",a.createElement(e,{to:"radio-buttons"},"Radio Buttons")," or"," ",a.createElement(e,{to:"toggle"},"Toggles")," instead.")),a.createElement("h5",null,"Using Text Areas in a Form"),a.createElement("p",null,"Reference the ",a.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Inputs in Form Layouts."))},basic:{label:"Basic Text Areas",description:()=>a.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:T.code`
|
|
8491
8491
|
function DemoComponent() {
|
|
8492
8492
|
const { formValue, formMeta, updateForm } = useSpsForm({ notes: "" });
|
|
8493
8493
|
|
|
@@ -8555,7 +8555,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8555
8555
|
</div>
|
|
8556
8556
|
);
|
|
8557
8557
|
}
|
|
8558
|
-
`}}}},dN={href:"string",icon:{type:"ReactNodeOrRenderFn",required:"true"},error:"boolean",errorIcon:"ReactNodeOrRenderFn",title:{type:"string",required:"true"},warning:"boolean",warningIcon:"ReactNodeOrRenderFn",disabled:"boolean"},pN=
|
|
8558
|
+
`}}}},dN={href:"string",icon:{type:"ReactNodeOrRenderFn",required:"true"},error:"boolean",errorIcon:"ReactNodeOrRenderFn",title:{type:"string",required:"true"},warning:"boolean",warningIcon:"ReactNodeOrRenderFn",disabled:"boolean"},pN=G(N({},Y),{href:y.exports.string,target:y.exports.string,icon:dt.isRequired,error:y.exports.bool,errorIcon:dt,title:y.exports.string.isRequired,warning:y.exports.bool,warningIcon:dt,disabled:y.exports.bool});function qi(e){const w=e,{className:t,href:n,target:s,icon:o,error:i=!1,errorIcon:c,title:l,unsafelyReplaceClassName:p,warning:u=!1,warningIcon:f,disabled:m=!1}=w,g=z(w,["className","href","target","icon","error","errorIcon","title","unsafelyReplaceClassName","warning","warningIcon","disabled"]),S=K(p||"sps-tile",t,i&&"sps-tile--error",u&&"sps-tile--warning",m&&"sps-tile--disabled");return a.useEffect(()=>{if(u&&i)throw new Error("Tile should have warning or error, not both")},[u,i]),a.createElement("div",{className:"sps-tile-container sfg-col-3 sfg-break-col-6"},a.createElement("a",N({className:S,href:m?void 0:n,target:s,rel:s==="_blank"?"noopener noreferrer":void 0},g),(u||i)&&a.createElement("div",{className:"sps-tile--icon"},u&&(f?ft(f):a.createElement("i",{className:K("sps-icon","sps-icon-status-warning")})),i&&(c?ft(c):a.createElement("i",{className:K("sps-icon","sps-icon-ban")}))),a.createElement("div",{className:"sps-tile--content"},a.createElement("div",{className:"sps-tile--image"},typeof o=="string"?a.createElement("img",{className:"sps-tile--image",src:o,alt:""}):ft(o)),a.createElement("div",{className:"sps-tile--title"},a.createElement("p",null,l,s==="_blank"&&a.createElement("i",{className:K("sps-icon","sps-icon-tabs")}))))))}Object.assign(qi,{props:dN,propTypes:pN,displayName:"SpsTile"});const uN={},mN=N({},Y);function Ji(e){const l=e,{children:t,unsafelyReplaceClassName:n,"data-testid":s,className:o}=l,i=z(l,["children","unsafelyReplaceClassName","data-testid","className"]),c=K(n||"sps-tile-list",o||"sfg-row");return a.createElement("div",N({className:c},i),t)}Object.assign(Ji,{props:uN,propTypes:mN,displayName:"SpsTileList"});const Wm={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
8559
8559
|
function Component() {
|
|
8560
8560
|
const apps = [
|
|
8561
8561
|
{
|
|
@@ -8754,7 +8754,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8754
8754
|
</>
|
|
8755
8755
|
)
|
|
8756
8756
|
}
|
|
8757
|
-
`}}}},fN={value:{type:"number",required:"true"},title:{type:"string",required:"true"},kind:"SpsFilterTileKind",active:"boolean"},hN=
|
|
8757
|
+
`}}}},fN={value:{type:"number",required:"true"},title:{type:"string",required:"true"},kind:"SpsFilterTileKind",active:"boolean"},hN=G(N({},Y),{value:y.exports.number.isRequired,title:y.exports.string.isRequired,kind:be(_.SpsFilterTileKind),active:y.exports.bool});function Zi(e){const g=e,{value:t,title:n,kind:s=_.SpsFilterTileKind.GENERAL,active:o,className:i,unsafelyReplaceClassName:c}=g,l=z(g,["value","title","kind","active","className","unsafelyReplaceClassName"]),[p,u]=a.useState(!1),f=o||p,m=K(c||"sps-filter-tile",i,`sps-filter-tile--${s}`,f&&"active");return a.createElement("div",N({className:m},l),a.createElement("div",{className:"sps-filter-tile__body",onMouseOver:()=>u(!0),onMouseOut:()=>u(!1)},a.createElement("div",{className:"sps-filter-tile__body__value"},t),a.createElement("div",{className:"sps-filter-tile__body__title"},n)),a.createElement("div",{className:"sps-filter-tile__footer"}))}Object.assign(Zi,{props:fN,propTypes:hN,displayName:"SpsFilterTile"});const gN={},SN=N({},Y);function Xi(e){const l=e,{children:t,unsafelyReplaceClassName:n,"data-testid":s,className:o}=l,i=z(l,["children","unsafelyReplaceClassName","data-testid","className"]),c=K(n||"sps-filter-tile-list",o);return a.createElement("div",N({className:c},i),t)}Object.assign(Xi,{props:gN,propTypes:SN,displayName:"SpsFilterTileList"});const Gm={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
8758
8758
|
function Component() {
|
|
8759
8759
|
const data = [
|
|
8760
8760
|
{
|
|
@@ -8804,7 +8804,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8804
8804
|
</>
|
|
8805
8805
|
)
|
|
8806
8806
|
}
|
|
8807
|
-
`}}}},Um={active:"boolean",description:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",label:"string",large:"boolean",onChange:"(isActive: boolean) => void"},bN=
|
|
8807
|
+
`}}}},Um={active:"boolean",description:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",label:"string",large:"boolean",onChange:"(isActive: boolean) => void"},bN=G(N({},Y),{active:y.exports.bool,description:y.exports.string,disabled:y.exports.bool,formControl:ce(),formMeta:ce(),id:y.exports.string,label:y.exports.string,large:y.exports.bool,onChange:ne(),ref:Ft()});function Qi(e){const F=e,{active:t,className:n,description:s,disabled:o,formControl:i,formMeta:c,id:l,label:p,large:u,onChange:f,ref:m,"data-testid":g,unsafelyReplaceClassName:S}=F,w=z(F,["active","className","description","disabled","formControl","formMeta","id","label","large","onChange","ref","data-testid","unsafelyReplaceClassName"]);Ic("SpsToggle",Um,e);const x=c||i,[C,D]=a.useState(t),{wrapperId:I,controlId:v}=Tt(l,x),k=`${I}_status-label`,R=`${I}_description`,B=a.useRef();a.useEffect(()=>D(t),[t]);function M(A){D(A.target.checked),x&&(x.setValue(A.target.checked),x.markAsDirty()),f&&f(A.target.checked),B.current.focus()}const L=K(S||"sps-toggle",C&&"sps-toggle--active",u&&"sps-toggle--large",o&&"sps-toggle--disabled",n);return a.createElement(it,{id:I,formControl:i,formMeta:c,inputRef:B,ref:m,"data-testid":`${g}`},a.createElement("div",{className:L},a.createElement("input",N({type:"checkbox",ref:B,className:"sps-toggle__input",id:v,checked:C||!1,disabled:o,onChange:M,"aria-describedby":`${k},${R}`,"data-testid":`${g}__input`},w)),a.createElement("span",{className:"sps-toggle__slider"}),p&&a.createElement("label",{className:"sps-toggle__status-label",htmlFor:v,id:k},p),s&&a.createElement("span",{className:"sps-toggle__description",id:R},s)))}Object.assign(Qi,{props:Um,propTypes:bN,displayName:"SpsToggle"});const Ym={general:{label:"General Usage",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Use Toggles:"),a.createElement("ul",null,a.createElement("li",{className:"mb-2"},'When an option represents a specific "on/off" state.'),a.createElement("li",{className:"mb-2"},"When the selection causes an imeediate change in the system.")),a.createElement("h5",null,"Do Not Use Toggles:"),a.createElement("ul",null,a.createElement("li",{className:"mb-2"},"When a selection does not cause an immediate change in the system."," ",a.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",a.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),a.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:()=>a.createElement("p",null,"Basic toggles can appear with or without labels and can include an extended description if necessary."),examples:{basic:{description:()=>a.createElement("h4",{className:"mb-3"},"Toggle"),react:T.code`
|
|
8808
8808
|
function DemoComponent() {
|
|
8809
8809
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
8810
8810
|
toggle: true
|
|
@@ -8963,7 +8963,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8963
8963
|
/>
|
|
8964
8964
|
)
|
|
8965
8965
|
}
|
|
8966
|
-
`}}}},zm={heading:"string",icon:"SpsIcon"},jm=
|
|
8966
|
+
`}}}},zm={heading:"string",icon:"SpsIcon"},jm=G(N({},Y),{heading:y.exports.string,icon:be(_.SpsIcon)});function Sr(e){const u=e,{children:t,className:n,icon:s,title:o,"data-testid":i,unsafelyReplaceClassName:c}=u,l=z(u,["children","className","icon","title","data-testid","unsafelyReplaceClassName"]),p=K(c||"sps-workflow",n);return a.createElement("div",N({className:p,"data-testid":`${i}`},l),o&&a.createElement("h1",{className:"sps-workflow__heading","data-testid":`${i}__title`},a.createElement("span",{className:"sps-workflow__icon","data-testid":`${i}__icon`},a.createElement("i",{"aria-hidden":"true",className:K("sps-icon",`sps-icon-${s}`)})),o),t)}Object.assign(Sr,{props:zm,propTypes:jm,displayName:"SpsWorkflow"});function qm(e){return a.createElement(Sr,N({},e))}Object.assign(qm,{props:zm,propTypes:jm,displayName:"SpsWf"});const vN={size:"RingSize",progress:"number"},yN=G(N({},Y),{progress:y.exports.number,size:be(_.RingSize)});function el({size:e=_.RingSize.SMALL,progress:t=0}){const n=4,s=e-n,o=s*2*Math.PI,i=o-t/100*o;return a.createElement("div",{className:"sps-progress-ring"},a.createElement("svg",{height:e*2,width:e*2,style:{transform:"rotate(-90deg)"}},a.createElement("circle",{stroke:Wr.colors.gray300,fill:"transparent",strokeWidth:n,strokeDasharray:`${o} ${o}`,r:s,cx:e,cy:e}),a.createElement("circle",{stroke:Wr.colors.purple200,fill:"transparent",strokeWidth:n,strokeDasharray:`${o} ${o}`,style:{strokeDashoffset:i},r:s,cx:e,cy:e})))}Object.assign(el,{props:vN,propTypes:yN,displayName:"SpsProgressRing"});const TN={phases:"WizardPhase[]"},wN=G(N({},Y),{phases:y.exports.arrayOf(ce())}),Lt="sps-wizard-sidebar";function tl({className:e,phases:t}){const n=K(Lt,e);return a.createElement("div",{className:n},t.map(s=>{const o=K(`${Lt}__phase-title`,s.disabled&&`${Lt}__phase-title--disabled`);return a.createElement("div",{className:`${Lt}__phase-wrapper`,key:s.title},a.createElement("div",{className:o},s.title),s.steps.map(i=>{const c=K(`${Lt}__step`,i.active&&`${Lt}__step--active`,i.disabled&&`${Lt}__step--disabled`,!!i.onClick&&!i.disabled&&`${Lt}__step--clickable`);return a.createElement("div",{className:c,key:i.title,onClick:!i.disabled&&i.onClick},a.createElement("div",{className:`${Lt}__step-progress`},i.percentComplete===100?a.createElement("div",{className:`${Lt}__step-complete`},a.createElement(Rt,{icon:_.SpsIcon.CHECKMARK})):a.createElement(el,{size:_.RingSize.SMALL,progress:i.percentComplete})),a.createElement("div",{className:`${Lt}__step-title`,role:"button"},i.title))}))}))}Object.assign(tl,{props:TN,propTypes:wN,displayName:"SpsWizardSidebar"});const EN={display:"string",condition:"WizardSubstepConditions",orderPosition:"string | number"},CN=G(N({},Y),{condition:be(_.WizardSubstepConditions).isRequired,display:y.exports.string.isRequired,orderPosition:y.exports.oneOfType([y.exports.string,y.exports.number]).isRequired});function nl(e){const{condition:t=_.WizardSubstepConditions.BASIC,orderPosition:n,display:s,children:o}=e;return a.createElement("div",{className:"sps-wizard-substep"},a.createElement("div",{className:K("sps-wizard-substep__heading",`sps-wizard-substep__heading--${t}`)},a.createElement("div",{className:"sps-wizard-substep__heading-icon"},t===_.WizardSubstepConditions.COMPLETED?a.createElement("i",{"aria-hidden":"true",className:"sps-icon sps-icon-checkmark"}):n),a.createElement("p",null,s)),a.createElement("div",{className:K("sps-wizard-substep__body",`sps-wizard-substep__body--${t}`)},o))}Object.assign(nl,{props:EN,propTypes:CN,displayName:"SpsWizardSubstep"});const Jm={substep:{label:"Substep",examples:{completed:{jsx:T.code`
|
|
8967
8967
|
<SpsWizardSubstep condition={WizardSubstepConditions.COMPLETED} orderPosition="1" display="Payment Options">
|
|
8968
8968
|
<div>Put a Route here</div>
|
|
8969
8969
|
</SpsWizardSubstep>
|
|
@@ -9031,7 +9031,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
9031
9031
|
</div>
|
|
9032
9032
|
)
|
|
9033
9033
|
}
|
|
9034
|
-
`}}}},Zm={},Xm=
|
|
9034
|
+
`}}}},Zm={},Xm=N({},Y);function br(e){const l=e,{children:t,className:n,"data-testid":s,unsafelyReplaceClassName:o}=l,i=z(l,["children","className","data-testid","unsafelyReplaceClassName"]),c=K(o||"sps-workflow__document",n);return a.createElement("span",N({className:c,"data-testid":`${s}__document`},i),t)}Object.assign(br,{props:Zm,propTypes:Xm,displayName:"SpsWorkflowDocument"});function Qm(e){return a.createElement(br,N({},e))}Object.assign(Qm,{props:Zm,propTypes:Xm,displayName:"SpsWfDoc"});const ef={icon:"SpsIcon"},tf=G(N({},Y),{icon:be(_.SpsIcon)});function vr(e){const p=e,{children:t,className:n,icon:s,"data-testid":o,unsafelyReplaceClassName:i}=p,c=z(p,["children","className","icon","data-testid","unsafelyReplaceClassName"]),l=K(i||"sps-workflow__document-status",n);return a.createElement("span",N({className:l,"data-testid":`${o}__doc-status`},c),s&&a.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${s}`}),t)}Object.assign(vr,{props:ef,propTypes:tf,displayName:"SpsWorkflowDocumentStatus"});function nf(e){return a.createElement(vr,N({},e))}Object.assign(nf,{props:ef,propTypes:tf,displayName:"SpsWfDs"});const af={icon:{type:"SpsIcon",required:!0},title:{type:"string",required:!0}},sf=G(N({},Y),{icon:be(_.SpsIcon).isRequired,title:y.exports.string.isRequired});function yr(e){const u=e,{children:t,className:n,icon:s,title:o,"data-testid":i,unsafelyReplaceClassName:c}=u,l=z(u,["children","className","icon","title","data-testid","unsafelyReplaceClassName"]),p=K(c||"sps-workflow__step",n);return a.createElement("div",N({className:p,"data-testid":`${i}__step`},l),a.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${s} sps-workflow__step-icon`}),a.createElement("h2",{className:"sps-workflow__step-heading","data-testid":`${i}__step-heading`},o),t)}Object.assign(yr,{props:af,propTypes:sf,displayName:"SpsWorkflowStep"});function rf(e){return a.createElement(yr,N({},e))}Object.assign(rf,{props:af,propTypes:sf,displayName:"SpsWfStep"});const of={basic:{label:"Basic Usage",examples:{basic:{jsx:T.code`
|
|
9035
9035
|
<div className="col-4">
|
|
9036
9036
|
<SpsWorkflow icon={SpsIcon.LIST_SUMMARY} title="Workflow">
|
|
9037
9037
|
<SpsWorkflowStep icon={SpsIcon.HEART} title="Name of Step">
|
|
@@ -9075,7 +9075,7 @@ var s=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
9075
9075
|
</SpsWfStep>
|
|
9076
9076
|
</SpsWf>
|
|
9077
9077
|
</div>
|
|
9078
|
-
`}}}},xN={illustration:"string",artwork:{type:"string",deprecated:!0},heading:{type:"string",required:!0},subHeading:"string"},DN=
|
|
9078
|
+
`}}}},xN={illustration:"string",artwork:{type:"string",deprecated:!0},heading:{type:"string",required:!0},subHeading:"string"},DN=G(N({},Y),{illustration:y.exports.string,artwork:y.exports.string,heading:y.exports.string.isRequired,subHeading:y.exports.string});function al(e){const g=e,{artwork:t,children:n,className:s,heading:o,illustration:i,subHeading:c,"data-testid":l,unsafelyReplaceClassName:p}=g,u=z(g,["artwork","children","className","heading","illustration","subHeading","data-testid","unsafelyReplaceClassName"]),f=i||t||Xl.SpsIllustrations.Large.BUILDING,m=K(p||"sps-zero-state",s);return a.createElement("div",{className:"sps-card__body","data-testid":`${l}`},a.createElement("div",N({className:m,"data-testid":`${l}__actual-zero-state`},u),a.createElement("img",{className:"sps-zero-state__image",src:f,alt:"","data-testid":`${l}__artwork`}),a.createElement("h1",{className:"sps-zero-state__heading","data-testid":`${l}__heading`},o),a.createElement("h2",{className:"sps-zero-state__subheading","data-testid":`${l}__subheading`},c),a.createElement("div",{className:"sps-zero-state__content","data-testid":`${l}__content`},n)))}Object.assign(al,{props:xN,propTypes:DN,displayName:"SpsZeroState"});const IN={illustration:"string",icon:{type:"SpsIcon",deprecated:!0},heading:"ReactNodeOrRenderFn",subHeading:"ReactNodeOrRenderFn"},NN=G(N({},Y),{illustration:y.exports.string,icon:be(_.SpsIcon),heading:dt,subHeading:dt});function sl(e){const f=e,{className:t,heading:n,icon:s,illustration:o=Xl.SpsIllustrations.Small.BUILDING,subHeading:i,"data-testid":c,unsafelyReplaceClassName:l}=f,p=z(f,["className","heading","icon","illustration","subHeading","data-testid","unsafelyReplaceClassName"]),u=K(l||"sps-zero-state","sps-zero-state--micro",t);return a.createElement("div",N({className:u,"data-testid":`${c}__actual-micro-zero-state`},p),s?a.createElement("i",{className:`sps-zero-state__icon sps-icon sps-icon-${s}`,"aria-hidden":"true","data-testid":`${c}__icon`}):a.createElement("img",{style:{height:"3rem"},src:o}),n&&a.createElement("h1",{className:"sps-zero-state__heading","data-testid":`${c}__heading`},n),i&&a.createElement("h2",{className:"sps-zero-state__subheading","data-testid":`${c}__subheading`},i))}Object.assign(sl,{props:IN,propTypes:NN,displayName:"SpsMicroZeroState"});const lf={sizes:{label:"Sizes",customSection:()=>a.createElement("section",{id:"zero-states-sizes"},a.createElement("div",{className:"flex-color-header"},a.createElement("h4",null,"Sizes"),a.createElement(Fe,{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},kind:_.ButtonKind.LINK},"Back to Top")),a.createElement("h5",{className:"mb-3"},"There are 2 sizes of Zero States: Large and Small. They differ in appearance and are used in different cases."),a.createElement("h4",null,"Large Zero States"),a.createElement("h5",{className:"mb-3"},"Use Large Zero States in primary or large areas of a page."),a.createElement("h4",null,"Small Zero States"),a.createElement("h5",{className:"mb-0"},"Use Small Zero States in a secondary or small areas of a page."))},regular:{label:"Usage: Large Zero States",description:({NavigateTo:e})=>a.createElement("span",{className:"sps-body-14 mt-4"},"Large Zero States may be accompanied by other components such as Headings, Subtitles, ",a.createElement(e,{to:"Button"},"Buttons"),","," ",a.createElement(e,{to:"List Toolbar"},"Search Bars"),", or a combination of these"),examples:{illustrationAndHeading:{description:"Illustration + Heading",jsx:T.code`
|
|
9079
9079
|
<SpsCard>
|
|
9080
9080
|
<SpsZeroState
|
|
9081
9081
|
heading="Search for a record"
|
|
@@ -9175,7 +9175,7 @@ function Component() {
|
|
|
9175
9175
|
</SpsCard>
|
|
9176
9176
|
</div>
|
|
9177
9177
|
</div>
|
|
9178
|
-
`}}}},kN={},MN=
|
|
9178
|
+
`}}}},kN={},MN=N({},Y);function rl(s){var o=s,{children:e,className:t}=o,n=z(o,["children","className"]);return a.createElement("div",N({className:K("sps-filter-panel",t)},n),e)}Object.assign(rl,{props:kN,propTypes:MN,displayName:"SpsFilterPanel"});const _N={title:"string",expanded:"boolean",heightPx:"number",heightRem:"number",onExpand:"() => void",onCollapse:"() => void"},RN=G(N({},Y),{title:y.exports.string,expanded:y.exports.bool,heightPx:y.exports.number,heightRem:y.exports.number,onExpand:ne(),onCollapse:ne()});function ol(u){var f=u,{children:e,className:t,title:n,expanded:s,heightPx:o,heightRem:i,onExpand:c,onCollapse:l}=f,p=z(f,["children","className","title","expanded","heightPx","heightRem","onExpand","onCollapse"]);const[m,g]=a.useState(s),S=typeof s!="undefined"?s:m,w=o?o/16:i,x=w?{overflowY:"scroll",height:`${w}rem`}:{},C=()=>a.createElement("button",{type:"button",className:"sps-filter-panel__section__expand-btn",onClick:()=>{g(!S),!S&&c?c():S&&l&&l()}},a.createElement(Rt,{icon:S?_.SpsIcon.MINUS_CIRCLE:_.SpsIcon.PLUS_CIRCLE}));return a.useEffect(()=>{g(s)},[s]),a.createElement("div",N({className:K("sps-filter-panel__section",t)},p),a.createElement("div",{className:"sps-filter-panel__section__title-wrapper"},a.createElement(C,null),a.createElement("p",null,n)),S&&a.createElement("div",{className:"sps-filter-panel__section__content-wrapper",style:x},a.createElement("div",{className:"sps-filter-panel__section__content"},e)))}Object.assign(ol,{props:_N,propTypes:RN,displayName:"SpsFilterPanelSection"});const LN={onClear:"() => void"},ON=G(N({},Y),{onClear:ne()});function il(o){var i=o,{children:e,className:t,onClear:n}=i,s=z(i,["children","className","onClear"]);const{t:c}=a.useContext(Oe);return a.createElement("div",N({className:K("sps-filter-panel__cap",t)},s),a.createElement("div",{className:"sps-filter-panel__cap__title-wrapper"},a.createElement(Rt,{icon:_.SpsIcon.FILTER,size:_.SpsIconSize.SMALL}),a.createElement("p",null,c("design-system:filterPanel.title"))),a.createElement(Fe,{kind:_.ButtonKind.LINK,onClick:n},c("design-system:filterPanel.clear")),e)}Object.assign(il,{props:LN,propTypes:ON,displayName:"SpsFilterPanelCap"});const cf={generalUsage:{label:"General Usage",examples:{general:{react:T.code`
|
|
9179
9179
|
function Component() {
|
|
9180
9180
|
const initialValues = {
|
|
9181
9181
|
colors: {
|
|
@@ -9476,7 +9476,7 @@ function Component() {
|
|
|
9476
9476
|
</div>
|
|
9477
9477
|
);
|
|
9478
9478
|
}
|
|
9479
|
-
`}}}},BN={value:"string",placeholder:"string",formMeta:"SpsFormFieldMeta<string>",onFilterChange:"ChangeEventHandler<HTMLInputElement>"},AN=
|
|
9479
|
+
`}}}},BN={value:"string",placeholder:"string",formMeta:"SpsFormFieldMeta<string>",onFilterChange:"ChangeEventHandler<HTMLInputElement>"},AN=G(N({},Y),{value:y.exports.string,placeholder:y.exports.string,formMeta:ce(),onFilterChange:ne()});function ll(c){var l=c,{className:e,value:t,placeholder:n,formMeta:s,onFilterChange:o}=l,i=z(l,["className","value","placeholder","formMeta","onFilterChange"]);const{t:p}=a.useContext(Oe);return a.createElement("div",N({className:K("sps-filter-panel__filter-box",e)},i),a.createElement(gr,{value:t,icon:_.SpsIcon.FILTER,formMeta:s,placeholder:n||p("design-system:filterPanel.filterPlaceholder"),onChange:o}))}Object.assign(ll,{props:BN,propTypes:AN,displayName:"SpsFilterPanelFilterBox"});const PN={showCondition:"boolean"},FN=G(N({},Y),{showCondition:y.exports.bool});function cl(o){var i=o,{showCondition:e=!0,children:t,className:n}=i,s=z(i,["showCondition","children","className"]);return e?a.createElement("div",N({className:K("sps-conditional-field",n)},s),t):null}Object.assign(cl,{props:PN,propTypes:FN,displayName:"SpsConditionalField"});const df={generalUsage:{label:"General Usage",examples:{withCheckbox:{react:T.code`
|
|
9480
9480
|
function Component() {
|
|
9481
9481
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
9482
9482
|
optionOne: true,
|
|
@@ -9594,7 +9594,7 @@ function Component() {
|
|
|
9594
9594
|
</SpsForm>
|
|
9595
9595
|
)
|
|
9596
9596
|
}
|
|
9597
|
-
`}}}},KN={"Advanced Search":{components:[Ur],examples:rc},Autocomplete:{components:[fs],examples:kc},Buttons:{description:()=>a.createElement(a.Fragment,null,a.createElement("div",{className:"sps-body-14"},"Buttons are used to initiate events or actions. The labels and/or icons describe what the button will do."),a.createElement("br",null),a.createElement("h5",null,"Variants"),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Default:"),"For tertiary actions or actions of lower importance on a page."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Key:"),"For primary or important actions on a page."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Confirm:"),"For the main call to action on a page. There should only be one Confirm button per screen."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Delete:"),"For deleting information or another destructive action. These should always be paired with a Delete Confirmation Modal."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Disabled:"),"For actions that are not permitted in a particular state. These can be accompanied by a Tooltip on hover describing why it\u2019s disabled."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"With an Icon:"),"For further illustrating the action. Example: Pencil icon in an Edit button. There can also be Icon Buttons without text.")),components:[Fe,Xr],examples:Mc},Cards:{description:()=>a.createElement("p",null,"Cards are used to group similar or related content together in a single container. They can be combined with additional elements such as Headers, Footers, or Tabs."),components:[po,ys,Ts,uo,vs],examples:od},Checkbox:{components:[In],examples:id},"Clickable Tags":{components:[Da],examples:ld},"Column Chooser":{components:[di,Xs],examples:gu},"Conditional Fields":{description:()=>a.createElement("p",null,"A conditional field is one that is only available when a certain option is selected amongst a set of checkboxes or radio buttons."),components:[cl],examples:df},"Content Rows":{components:[pi,_n,Qs,hr,Ka],examples:vu},"Content Tiles":{components:[qi,Ji,hr,Ka],examples:Wm},"Filter Tiles":{components:[Zi,Xi],examples:Gm},Datepicker:{components:[fi],examples:Cu},"Date Range Picker":{components:[gi],examples:Du},Datetime:{components:[Si],examples:Iu},"Description Lists":{description:()=>a.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[er,tr,ar],examples:Fu},Dropdown:{components:[xn,bi],examples:Ku},"Feedback Blocks":{description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("p",null,"Feedback Blocks show static informational messages on a page. They should not dynamically appear or disappear. For feedback that responds to a user action, Use a"," ",a.createElement(e,{to:"growler"},"Growler")," instead."),a.createElement("h5",null,"Variants"),a.createElement("p",null,"Variants are generally tied to a specific color and an accompanying icon."),a.createElement(en,{kind:M.FeedbackBlockKind.ERROR,message:"Error"}),a.createElement(en,{kind:M.FeedbackBlockKind.INFO,message:"Information"}),a.createElement(en,{kind:M.FeedbackBlockKind.TIP,message:"Tip"}),a.createElement(en,{kind:M.FeedbackBlockKind.SUCCESS,message:"Success"}),a.createElement(en,{kind:M.FeedbackBlockKind.WARNING,message:"Warning"})),components:[vi,en],examples:Vu},Fieldset:{components:[yi],examples:$u},"Filter Panel":{components:[rl,ol,il,ll],examples:cf},"Focused Task":{components:[rr,sr],examples:Hu},Form:{components:[ga],examples:Wu},Growlers:{description:()=>a.createElement("p",null,"Use Growlers for dynamic messages in response to a user's action. All Growlers have a Primary Message, and may optionally have a Secondary Message as needed. Growlers may also contain Hyperlinks in the Secondary Message."),components:[or],examples:Gu},Incrementor:{components:[wi],examples:Uu},"Insight Tiles":{components:[Yu,Ei],examples:OD},"Key Value Lists":{description:()=>a.createElement("p",null,"Key Value Lists consist of a title and value, or values, paired together visually. They are ideal for displaying details (a value or values) that require additional context (title)."),components:[Ci,xi],examples:zu},Label:{description:()=>a.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[Di],examples:ju},"List Action Bar":{description:()=>a.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:[Ii],examples:hm},"List Toolbar":{description:()=>a.createElement("p",null,"The List Toolbar provides the ability to interact with elements in a list or table. It can contain elements to search, filter, sort, or perform other actions."),components:[Mi,lr,cr,_i],examples:ym},"Micro Block":{components:[en],examples:Tm},Modals:{description:()=>a.createElement("p",null,"Modals are overlays on a page that focus a user\u2019s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[Ri,dr],examples:wm},"Multi Select":{description:()=>a.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:Em},"Page Title":{components:[Oi,Bi],examples:Cm},Pagination:{description:()=>a.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:[Ai,ur],examples:xm},"Product Bar":{components:[Pi,mr],examples:Dm},"Progress Bar":{description:()=>a.createElement("p",null,"Progress Bars are used to visualize the progression of a process (such as a file upload) or series of related tasks that take place over a longer period of time. Progress Bars can be accompanied by a variety of additional content to provide more context regarding the processes being performed."),components:[Fi],examples:km},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[$i],examples:Mm},"Scrollable Container":{components:[Hi],examples:_m},"Search Results Bar":{components:[ir],examples:bm},Select:{description:"Selects consist off a Label and a dropdown menu from which a user selects a value from a list of pre-defined options.",components:[pr],examples:Rm},"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:[Om],examples:Bm},Spinner:{components:[us],examples:Am},"Split Button":{components:[Wi],examples:Pm},"Stepped Progress Bar":{components:[Vi],examples:Im},"Slack Link":{components:[Gi],examples:Fm},"Summary List Row":{components:[Ui,Yi,Va],examples:Km},Tables:{description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"sps-body-14"},"Tables (along with ",a.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",a.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),a.createElement("br",null),a.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:[Ln,hn,ae,fn,Qe,Be],examples:mm},Tags:{components:[xt],examples:fm},"Task Queue":{components:[zi],examples:Vm},"Text Inputs":{description:()=>a.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[gr],examples:$m},"Text Areas":{description:()=>a.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[ji],examples:Hm},Toggle:{description:()=>a.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[Qi],examples:Ym},Tooltips:{components:[Dt,Ki],examples:Nm},Wizard:{components:[tl,nl],examples:Jm},Workflow:{components:[Sr,br,vr,yr],examples:of},"Zero States":{description:"Zero States are placeholders in content areas when there is no content to show. You can view all available illustrations on the Illustrations page.",components:[al,sl],examples:lf}},VN=function({viewing:e,in:t,onChange:n}){return a.createElement("div",{className:"sps-context-bar"},"Viewing",a.createElement("span",{className:"sps-context-bar__emphasized"},e),Boolean(t)&&a.createElement(a.Fragment,null,"in",a.createElement("span",{className:"sps-context-bar__emphasized"},t)),Boolean(n)&&a.createElement(Fe,{className:"sps-context-bar__change-button",kind:M.ButtonKind.LINK,onClick:n},"Change"))},$N={disabled:"boolean",formMeta:"SpsFormFieldMeta<number>",name:"string",onChange:"ChangeEventHandler<number>",value:"number"},HN=H(k({},Y),{disabled:y.exports.bool,formMeta:ce(),name:y.exports.string,onChange:ne(),ref:Ft(),value:y.exports.number});function WN(e){return e?Number.parseInt(e.replace(/[^\d]/g,""),10)/100:null}function GN(e){return typeof e=="number"?e.toFixed(2):""}function pf(f){var m=f,{className:e,disabled:t=!1,formMeta:n,id:s,name:o,onChange:i,ref:c,title:l,value:p}=m,u=z(m,["className","disabled","formMeta","id","name","onChange","ref","title","value"]);const{wrapperId:g,controlId:S}=Tt(s,n),w=a.useRef();function x(N){n&&(n.setValue(N),n.markAsDirty()),i&&i(N)}function E(){x(null)}function D(N){x(WN(N.target.value))}function I(N){N.currentTarget.setSelectionRange(N.currentTarget.value.length,N.currentTarget.value.length)}const v=K("sps-text-input",e);return a.createElement(it,{id:g,className:v,formMeta:n,inputRef:w,ref:c},a.createElement("div",{className:K("sps-form-control",t&&"disabled")},a.createElement(Rt,{className:"sps-text-input__icon",icon:M.SpsIcon.DOLLAR_SIGN}),a.createElement("input",k({type:"text",ref:w,onFocus:I,className:"sps-text-input__input",id:S,name:o,placeholder:"0.00",onChange:D,title:l,value:GN(p),disabled:t},u)),p!==null&&!t&&a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:E})))}Object.assign(pf,{props:$N,propTypes:HN,displayName:"SpsCurrencyInput"});const UN={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
9597
|
+
`}}}},KN={"Advanced Search":{components:[Ur],examples:rc},Autocomplete:{components:[fs],examples:kc},Buttons:{description:()=>a.createElement(a.Fragment,null,a.createElement("div",{className:"sps-body-14"},"Buttons are used to initiate events or actions. The labels and/or icons describe what the button will do."),a.createElement("br",null),a.createElement("h5",null,"Variants"),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Default:"),"For tertiary actions or actions of lower importance on a page."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Key:"),"For primary or important actions on a page."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Confirm:"),"For the main call to action on a page. There should only be one Confirm button per screen."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Delete:"),"For deleting information or another destructive action. These should always be paired with a Delete Confirmation Modal."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"Disabled:"),"For actions that are not permitted in a particular state. These can be accompanied by a Tooltip on hover describing why it\u2019s disabled."),a.createElement("div",{className:"sps-body-14"},a.createElement("span",{className:"sps-text-semibold"},"With an Icon:"),"For further illustrating the action. Example: Pencil icon in an Edit button. There can also be Icon Buttons without text.")),components:[Fe,Xr],examples:Mc},Cards:{description:()=>a.createElement("p",null,"Cards are used to group similar or related content together in a single container. They can be combined with additional elements such as Headers, Footers, or Tabs."),components:[po,ys,Ts,uo,vs],examples:od},Checkbox:{components:[In],examples:id},"Clickable Tags":{components:[Da],examples:ld},"Column Chooser":{components:[di,Xs],examples:gu},"Conditional Fields":{description:()=>a.createElement("p",null,"A conditional field is one that is only available when a certain option is selected amongst a set of checkboxes or radio buttons."),components:[cl],examples:df},"Content Rows":{components:[pi,_n,Qs,hr,Ka],examples:vu},"Content Tiles":{components:[qi,Ji,hr,Ka],examples:Wm},"Filter Tiles":{components:[Zi,Xi],examples:Gm},Datepicker:{components:[fi],examples:Cu},"Date Range Picker":{components:[gi],examples:Du},Datetime:{components:[Si],examples:Iu},"Description Lists":{description:()=>a.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[er,tr,ar],examples:Fu},Dropdown:{components:[xn,bi],examples:Ku},"Feedback Blocks":{description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("p",null,"Feedback Blocks show static informational messages on a page. They should not dynamically appear or disappear. For feedback that responds to a user action, Use a"," ",a.createElement(e,{to:"growler"},"Growler")," instead."),a.createElement("h5",null,"Variants"),a.createElement("p",null,"Variants are generally tied to a specific color and an accompanying icon."),a.createElement(en,{kind:_.FeedbackBlockKind.ERROR,message:"Error"}),a.createElement(en,{kind:_.FeedbackBlockKind.INFO,message:"Information"}),a.createElement(en,{kind:_.FeedbackBlockKind.TIP,message:"Tip"}),a.createElement(en,{kind:_.FeedbackBlockKind.SUCCESS,message:"Success"}),a.createElement(en,{kind:_.FeedbackBlockKind.WARNING,message:"Warning"})),components:[vi,en],examples:Vu},Fieldset:{components:[yi],examples:$u},"Filter Panel":{components:[rl,ol,il,ll],examples:cf},"Focused Task":{components:[rr,sr],examples:Hu},Form:{components:[ga],examples:Wu},Growlers:{description:()=>a.createElement("p",null,"Use Growlers for dynamic messages in response to a user's action. All Growlers have a Primary Message, and may optionally have a Secondary Message as needed. Growlers may also contain Hyperlinks in the Secondary Message."),components:[or],examples:Gu},Incrementor:{components:[wi],examples:Uu},"Insight Tiles":{components:[Yu,Ei],examples:OD},"Key Value Lists":{description:()=>a.createElement("p",null,"Key Value Lists consist of a title and value, or values, paired together visually. They are ideal for displaying details (a value or values) that require additional context (title)."),components:[Ci,xi],examples:zu},Label:{description:()=>a.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[Di],examples:ju},"List Action Bar":{description:()=>a.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:[Ii],examples:hm},"List Toolbar":{description:()=>a.createElement("p",null,"The List Toolbar provides the ability to interact with elements in a list or table. It can contain elements to search, filter, sort, or perform other actions."),components:[Mi,lr,cr,_i],examples:ym},"Micro Block":{components:[en],examples:Tm},Modals:{description:()=>a.createElement("p",null,"Modals are overlays on a page that focus a user\u2019s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[Ri,dr],examples:wm},"Multi Select":{description:()=>a.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:Em},"Page Title":{components:[Oi,Bi],examples:Cm},Pagination:{description:()=>a.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:[Ai,ur],examples:xm},"Product Bar":{components:[Pi,mr],examples:Dm},"Progress Bar":{description:()=>a.createElement("p",null,"Progress Bars are used to visualize the progression of a process (such as a file upload) or series of related tasks that take place over a longer period of time. Progress Bars can be accompanied by a variety of additional content to provide more context regarding the processes being performed."),components:[Fi],examples:km},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[$i],examples:Mm},"Scrollable Container":{components:[Hi],examples:_m},"Search Results Bar":{components:[ir],examples:bm},Select:{description:"Selects consist off a Label and a dropdown menu from which a user selects a value from a list of pre-defined options.",components:[pr],examples:Rm},"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:[Om],examples:Bm},Spinner:{components:[us],examples:Am},"Split Button":{components:[Wi],examples:Pm},"Stepped Progress Bar":{components:[Vi],examples:Im},"Slack Link":{components:[Gi],examples:Fm},"Summary List Row":{components:[Ui,Yi,Va],examples:Km},Tables:{description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"sps-body-14"},"Tables (along with ",a.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",a.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),a.createElement("br",null),a.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:[Ln,hn,ae,fn,Qe,Be],examples:mm},Tags:{components:[xt],examples:fm},"Task Queue":{components:[zi],examples:Vm},"Text Inputs":{description:()=>a.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[gr],examples:$m},"Text Areas":{description:()=>a.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[ji],examples:Hm},Toggle:{description:()=>a.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[Qi],examples:Ym},Tooltips:{components:[Dt,Ki],examples:Nm},Wizard:{components:[tl,nl],examples:Jm},Workflow:{components:[Sr,br,vr,yr],examples:of},"Zero States":{description:"Zero States are placeholders in content areas when there is no content to show. You can view all available illustrations on the Illustrations page.",components:[al,sl],examples:lf}},VN=function({viewing:e,in:t,onChange:n}){return a.createElement("div",{className:"sps-context-bar"},"Viewing",a.createElement("span",{className:"sps-context-bar__emphasized"},e),Boolean(t)&&a.createElement(a.Fragment,null,"in",a.createElement("span",{className:"sps-context-bar__emphasized"},t)),Boolean(n)&&a.createElement(Fe,{className:"sps-context-bar__change-button",kind:_.ButtonKind.LINK,onClick:n},"Change"))},$N={disabled:"boolean",formMeta:"SpsFormFieldMeta<number>",name:"string",onChange:"ChangeEventHandler<number>",value:"number"},HN=G(N({},Y),{disabled:y.exports.bool,formMeta:ce(),name:y.exports.string,onChange:ne(),ref:Ft(),value:y.exports.number});function WN(e){return e?Number.parseInt(e.replace(/[^\d]/g,""),10)/100:null}function GN(e){return typeof e=="number"?e.toFixed(2):""}function pf(f){var m=f,{className:e,disabled:t=!1,formMeta:n,id:s,name:o,onChange:i,ref:c,title:l,value:p}=m,u=z(m,["className","disabled","formMeta","id","name","onChange","ref","title","value"]);const{wrapperId:g,controlId:S}=Tt(s,n),w=a.useRef();function x(k){n&&(n.setValue(k),n.markAsDirty()),i&&i(k)}function C(){x(null)}function D(k){x(WN(k.target.value))}function I(k){k.currentTarget.setSelectionRange(k.currentTarget.value.length,k.currentTarget.value.length)}const v=K("sps-text-input",e);return a.createElement(it,{id:g,className:v,formMeta:n,inputRef:w,ref:c},a.createElement("div",{className:K("sps-form-control",t&&"disabled")},a.createElement(Rt,{className:"sps-text-input__icon",icon:_.SpsIcon.DOLLAR_SIGN}),a.createElement("input",N({type:"text",ref:w,onFocus:I,className:"sps-text-input__input",id:S,name:o,placeholder:"0.00",onChange:D,title:l,value:GN(p),disabled:t},u)),p!==null&&!t&&a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:C})))}Object.assign(pf,{props:$N,propTypes:HN,displayName:"SpsCurrencyInput"});const UN={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
9598
9598
|
function DemoComponent() {
|
|
9599
9599
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
9600
9600
|
foo: 1.2,
|
|
@@ -9628,7 +9628,7 @@ function Component() {
|
|
|
9628
9628
|
</>
|
|
9629
9629
|
)
|
|
9630
9630
|
}
|
|
9631
|
-
`}}}};function YN(){const[e,t]=a.useState([]),n=a.useCallback(()=>e.map((o,i)=>a.createElement(or,{id:o.id,key:o.id,title:o.title,kind:o.kind,imgSrc:o.imgSrc,onClose:()=>{o.onClose&&o.onClose(),o.closed=!0,e.every(c=>c.closed)&&t([])}},ft(o.content))),[e]),s=a.useCallback(o=>{t(i=>[...i,
|
|
9631
|
+
`}}}};function YN(){const[e,t]=a.useState([]),n=a.useCallback(()=>e.map((o,i)=>a.createElement(or,{id:o.id,key:o.id,title:o.title,kind:o.kind,imgSrc:o.imgSrc,onClose:()=>{o.onClose&&o.onClose(),o.closed=!0,e.every(c=>c.closed)&&t([])}},ft(o.content))),[e]),s=a.useCallback(o=>{t(i=>[...i,G(N({},o),{kind:o.kind||_.GrowlerKind.INFO,id:o.id||sn()})])},[]);return[n,s]}const zN={color:"TagKind",href:"String",icon:"SpsIcon",tagKey:{type:"String",required:!0},value:{type:"String",required:!0}},jN=G(N({},Y),{color:be(_.TagKind),href:y.exports.string,icon:be(_.SpsIcon),tagKey:y.exports.string.isRequired,value:y.exports.string.isRequired});function uf(e){const m=e,{color:t=_.TagKind.KEY,className:n,"data-testid":s,href:o,icon:i,tagKey:c,value:l,unsafelyReplaceClassName:p}=m,u=z(m,["color","className","data-testid","href","icon","tagKey","value","unsafelyReplaceClassName"]),f=K(p||"sps-key-value-tag",o&&"sps-key-value-tag--link",n);return a.createElement("span",N({className:f,"data-testid":`${s}__key-value-tag`},u),a.createElement(xt,{icon:i,kind:t,className:"sps-key-value-tag--key"},c),a.createElement(xt,{className:"sps-key-value-tag--value"},o&&a.createElement("a",{href:o},l),!o&&l))}Object.assign(uf,{props:zN,propTypes:jN,displayName:"SpsKeyValueTag"});const qN={basic:{label:"Basic",examples:{basic:{react:T.code`
|
|
9632
9632
|
function Component() {
|
|
9633
9633
|
return (
|
|
9634
9634
|
<>
|
|
@@ -9653,7 +9653,7 @@ function Component() {
|
|
|
9653
9653
|
)
|
|
9654
9654
|
}
|
|
9655
9655
|
`}}}};function mf(e,t){const n=new RegExp(`[\\t\r
|
|
9656
|
-
${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter(s=>s!=="")}const JN={disabled:"boolean",formMeta:"SpsFormFieldMeta<any[]>",icon:"SpsIcon",onChange:"ChangeEventHandler",onEntryChange:"(searchText: string) => void",placeholder:"string",value:"any",createTagOptions:"string[]"},ZN=
|
|
9656
|
+
${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter(s=>s!=="")}const JN={disabled:"boolean",formMeta:"SpsFormFieldMeta<any[]>",icon:"SpsIcon",onChange:"ChangeEventHandler",onEntryChange:"(searchText: string) => void",placeholder:"string",value:"any",createTagOptions:"string[]"},ZN=G(N({},Y),{disabled:y.exports.bool,formControl:ce(),formMeta:ce(),icon:be(_.SpsIcon),onChange:ne(),onEntryChange:ne(),placeholder:y.exports.string,value:y.exports.any,createTagOptions:y.exports.arrayOf(y.exports.string)});function ff(w){var x=w,{className:e,disabled:t,formControl:n,formMeta:s,id:o,onChange:i,onEntryChange:c,placeholder:l,unsafelyReplaceClassName:p,value:u,icon:f,createTagOptions:m=[" ",","],"data-testid":g}=x,S=z(x,["className","disabled","formControl","formMeta","id","onChange","onEntryChange","placeholder","unsafelyReplaceClassName","value","icon","createTagOptions","data-testid"]);const C=s||n,{wrapperId:D,controlId:I}=Tt(o,C),[v,k]=Kt({keyDown:null,searchText:"",activeTagIndex:null,optionIds:""});a.useEffect(()=>{c&&c(v.searchText)},[v.searchText]);const R=a.useRef(),B=a.useRef(),M=a.useRef();function L(){setTimeout(()=>{B.current.focus()},0)}function F(j){k({searchText:""}),C&&(C.setValue(j),C.markAsDirty()),i&&i(new on({value:j}))}function A(j){const Z=u.filter((oe,ee)=>ee!==j);F(Z)}function $(j){k({searchText:j.target.value})}function V(j){if(M.current&&M.current.children.length&&j!==null){const Z=M.current.children[j],oe=Z==null?void 0:Z.querySelector(".sps-clickable-tag__icon");oe&&oe.focus()}}const W=a.useCallback(j=>{k({activeTagIndex:null,searchText:""});const Z=v.searchText.trim();Z&&u.indexOf(Z)===-1&&F([...u,...mf(Z,m)]),!((j.key==="Tab"||j.key==="Enter")&&!v.searchText)&&j.preventDefault()},[v.searchText,u,mf]);function pe(j){if(!t){const Z=!j.target.selectionStart&&u&&u.length;switch(j.key){case"Backspace":if(v.activeTagIndex===u.length-1){A(v.activeTagIndex),L();return}if(v.activeTagIndex!==null){A(v.activeTagIndex);return}if(Z){F(u.slice(0,u.length-1)),L();return}break;case"Delete":v.activeTagIndex!==null&&(A(v.activeTagIndex),L());break;case"Enter":case"Tab":W(j);break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":j.preventDefault();break;case"Left":case"ArrowLeft":if(Z){v.activeTagIndex===null?(k({activeTagIndex:u.length-1}),V(u.length-1)):v.activeTagIndex>0&&(k({activeTagIndex:v.activeTagIndex-1}),V(v.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(v.activeTagIndex!==null){v.activeTagIndex===u.length-1?(k({activeTagIndex:null}),B.current.focus()):(k({activeTagIndex:v.activeTagIndex+1}),V(v.activeTagIndex+1));return}break}for(const oe of m)j.key===oe&&W(j);j.persist(),k({keyDown:j})}}function me(j){F([]),j.stopPropagation()}const re=K(p||"sps-multi-select",t&&"sps-form-control--disabled",e),se=new Array(u.length).fill(0).map((j,Z)=>`${D}_tag-${Z}`);return a.createElement(it,{id:D,className:re,formControl:n,formMeta:s,ref:R,inputRef:B,focusInputOnClick:!0,onKeyDown:pe,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":se[v.activeTagIndex],"aria-owns":v.optionIds},a.createElement("div",{className:"sps-text-input"},a.createElement("div",{className:K("sps-form-control",u&&!t&&"sps-form-control--clearable")},f&&a.createElement("i",{className:K("sps-text-input__icon","sps-icon",`sps-icon-${f}`)}),a.createElement("div",{className:"sps-multi-select__tags-and-input",ref:M},Array.isArray(u)&&u.map((j,Z)=>a.createElement(Da,{id:se[Z],role:"option",disabled:t,"aria-selected":"true",key:se[Z],onRemove:()=>A(Z)},a.createElement("span",null,j))),a.createElement("input",N({type:"text",ref:B,"data-testid":`${g}__multi-value-text-input`,value:v.searchText,className:"sps-text-input__input",placeholder:v.searchText.length===0?l:void 0,id:I,onChange:$,onKeyDown:pe,disabled:t,role:"listbox","aria-multiselectable":"true","aria-owns":se.join(" ")},S))),u.length!==0&&!t?a.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:j=>me(j)}):null)))}Object.assign(ff,{props:JN,propTypes:ZN,displayName:"SpsMultiValueTextInput"});const XN={general:{label:"General Usage",description:({NavigateTo:e})=>a.createElement(a.Fragment,null,a.createElement("h5",null,"Coming soon"))}};function QN(e,t){const n=N(N({},_.SPS_ACTION_DEFAULTS),e),[s,o]=Kt(n);return Object.assign(t,s),[t,i=>{o(i),Object.assign(t,s)}]}const ek={basic:{label:"Basic Sorting Header",examples:{basic:{react:T.code`
|
|
9657
9657
|
function DemoComponent() {
|
|
9658
9658
|
const [sort, setSort] = React.useState([{ key: 'id', direction: SortDirection.DESCENDING }]);
|
|
9659
9659
|
|
|
@@ -9700,4 +9700,4 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9700
9700
|
</>
|
|
9701
9701
|
)
|
|
9702
9702
|
}
|
|
9703
|
-
`}}}},hf={},gf=
|
|
9703
|
+
`}}}},hf={},gf=N({},Y);function dl(e){const o=e,{className:t}=o,n=z(o,["className"]),s=K("sps-vertical-rule",t);return a.createElement("div",N({className:s},n))}Object.assign(dl,{props:hf,propTypes:gf,displayName:"SpsVerticalRule / SpsVr"});function Sf(e){return a.createElement(dl,N({},e))}Object.assign(Sf,{props:hf,propTypes:gf,displayName:"SpsDescriptionListTerm / SpsDt"});exports.AsTypingErrorKeys=Un;exports.ContentOrderExample=vm;exports.DEFAULT_PRESETS=hi;exports.DragDropContext=au;exports.Draggable=mu;exports.Droppable=ii;exports.FauxChangeEvent=on;exports.I18nContext=Oe;exports.MANIFEST=KN;exports.OnBlurErrorKeys=kt;exports.OnSubmitErrorKeys=Sa;exports.PortalContext=Mt;exports.PreventativeErrorKeys=Xt;exports.Provide=Dc;exports.SimpleDateUtils=he;exports.SpsAddRemoveFormRowExamples=ID;exports.SpsAdvancedSearch=Ur;exports.SpsAdvancedSearchExamples=rc;exports.SpsApp=Xb;exports.SpsAutocomplete=fs;exports.SpsAutocompleteExamples=kc;exports.SpsButton=Fe;exports.SpsButtonExamples=Mc;exports.SpsButtonGroup=Xr;exports.SpsCard=ci;exports.SpsCardExamples=od;exports.SpsCardTabbedPane=li;exports.SpsCardV2=po;exports.SpsCardV2Footer=ys;exports.SpsCardV2Header=Ts;exports.SpsCardV2Title=uo;exports.SpsCheckbox=In;exports.SpsCheckboxDropdown=bi;exports.SpsCheckboxExamples=id;exports.SpsClickableTag=Da;exports.SpsClickableTagExamples=ld;exports.SpsColumnChooser=di;exports.SpsColumnChooserColumn=Xs;exports.SpsColumnChooserExamples=gu;exports.SpsConditionalField=cl;exports.SpsConditionalFieldExamples=df;exports.SpsContentRow=pi;exports.SpsContentRowCol=_n;exports.SpsContentRowExamples=vu;exports.SpsContentRowExpansion=Qs;exports.SpsContextBar=VN;exports.SpsCurrencyInput=pf;exports.SpsCurrencyInputExamples=UN;exports.SpsDateRangePicker=gi;exports.SpsDateRangePickerExamples=Du;exports.SpsDateTime=Si;exports.SpsDatepicker=fi;exports.SpsDatepickerExamples=Cu;exports.SpsDatetimeExamples=Iu;exports.SpsDd=Lu;exports.SpsDescriptionList=er;exports.SpsDescriptionListDefinition=tr;exports.SpsDescriptionListExamples=Fu;exports.SpsDescriptionListTerm=ar;exports.SpsDl=Mu;exports.SpsDropdown=xn;exports.SpsDropdownExamples=Ku;exports.SpsDt=Pu;exports.SpsFeedbackBlock=vi;exports.SpsFeedbackBlockExamples=Vu;exports.SpsFieldset=yi;exports.SpsFieldsetExamples=$u;exports.SpsFilterPanel=rl;exports.SpsFilterPanelCap=il;exports.SpsFilterPanelExamples=cf;exports.SpsFilterPanelFilterBox=ll;exports.SpsFilterPanelSection=ol;exports.SpsFilterTile=Zi;exports.SpsFilterTileList=Xi;exports.SpsFilterTileListExamples=Gm;exports.SpsFocusedTask=rr;exports.SpsFocusedTaskActions=sr;exports.SpsFocusedTaskExamples=Hu;exports.SpsForm=ga;exports.SpsFormArrayMeta=hc;exports.SpsFormComponentWrapper=it;exports.SpsFormExamples=Wu;exports.SpsFormFieldMeta=En;exports.SpsFormGroupMeta=fc;exports.SpsFormMetaBase=wn;exports.SpsFormSetMeta=ls;exports.SpsGrowler=or;exports.SpsGrowlerExamples=Gu;exports.SpsI=Rt;exports.SpsIconButtonPanel=um;exports.SpsIncrementor=wi;exports.SpsIncrementorExamples=Uu;exports.SpsInputGroup=ki;exports.SpsInsightTile=Ei;exports.SpsInsights=Yu;exports.SpsKeyValueList=Ci;exports.SpsKeyValueListExamples=zu;exports.SpsKeyValueListItem=xi;exports.SpsKeyValueTag=uf;exports.SpsKeyValueTagExamples=qN;exports.SpsLabel=Di;exports.SpsLabelExamples=ju;exports.SpsListActionBar=Ii;exports.SpsListActionBarExamples=hm;exports.SpsListToolbar=Mi;exports.SpsListToolbarExamples=ym;exports.SpsListToolbarSearch=lr;exports.SpsListToolbarSearchInfo=cr;exports.SpsListToolbarSortBy=_i;exports.SpsMicroBlock=en;exports.SpsMicroBlockExamples=Tm;exports.SpsMicroZeroState=sl;exports.SpsModal=Ri;exports.SpsModalExamples=wm;exports.SpsModalFooter=dr;exports.SpsMultiSelect=Li;exports.SpsMultiSelectExamples=Em;exports.SpsMultiValueTextInput=ff;exports.SpsMultiValueTextInputExamples=XN;exports.SpsPageSelector=ur;exports.SpsPageSubtitle=Bi;exports.SpsPageTitle=Oi;exports.SpsPageTitleExamples=Cm;exports.SpsPagination=Ai;exports.SpsPaginationExamples=xm;exports.SpsProductBar=Pi;exports.SpsProductBarExamples=Dm;exports.SpsProductBarTab=mr;exports.SpsProgressBar=Fi;exports.SpsProgressBarExamples=km;exports.SpsProgressRing=el;exports.SpsRadioButton=$i;exports.SpsRadioButtonExamples=Mm;exports.SpsScrollableContainer=Hi;exports.SpsScrollableContainerExamples=_m;exports.SpsSearchResultsBar=Sm;exports.SpsSearchResultsBarExamples=bm;exports.SpsSearchResultsBarV2=ir;exports.SpsSelect=pr;exports.SpsSelectExamples=Rm;exports.SpsSideNav=Om;exports.SpsSideNavExamples=Bm;exports.SpsSlackLink=Gi;exports.SpsSlackLinkExamples=Fm;exports.SpsSortingHeader=hr;exports.SpsSortingHeaderCell=Ka;exports.SpsSortingHeaderExamples=ek;exports.SpsSpinner=us;exports.SpsSpinnerExamples=Am;exports.SpsSplitButton=Wi;exports.SpsSplitButtonExamples=Pm;exports.SpsSteppedProgressBar=Vi;exports.SpsSteppedProgressBarExamples=Im;exports.SpsSummaryListColumn=Yi;exports.SpsSummaryListExamples=Km;exports.SpsSummaryListExpansion=Va;exports.SpsSummaryListRow=Ui;exports.SpsTab=sd;exports.SpsTabPanel=rd;exports.SpsTable=Ln;exports.SpsTableBody=hn;exports.SpsTableCell=ae;exports.SpsTableExamples=mm;exports.SpsTableHead=fn;exports.SpsTableHeader=Qe;exports.SpsTableRow=Be;exports.SpsTabsV2=vs;exports.SpsTag=xt;exports.SpsTagExamples=fm;exports.SpsTaskQueue=zi;exports.SpsTaskQueueExamples=Vm;exports.SpsTbody=lm;exports.SpsTd=pm;exports.SpsTextInput=gr;exports.SpsTextInputExamples=$m;exports.SpsTextarea=ji;exports.SpsTextareaExamples=Hm;exports.SpsTh=Qu;exports.SpsThead=nm;exports.SpsTile=qi;exports.SpsTileList=Ji;exports.SpsTileListExamples=Wm;exports.SpsToggle=Qi;exports.SpsToggleExamples=Ym;exports.SpsTooltip=Dt;exports.SpsTooltipExamples=Nm;exports.SpsTooltipTitle=Ki;exports.SpsTr=rm;exports.SpsValidators=is;exports.SpsVerticalRule=dl;exports.SpsVr=Sf;exports.SpsWf=qm;exports.SpsWfDoc=Qm;exports.SpsWfDs=nf;exports.SpsWfStep=rf;exports.SpsWizardExamples=Jm;exports.SpsWizardSidebar=tl;exports.SpsWizardSubstep=nl;exports.SpsWorkflow=Sr;exports.SpsWorkflowDocument=br;exports.SpsWorkflowDocumentStatus=vr;exports.SpsWorkflowExamples=of;exports.SpsWorkflowStep=yr;exports.SpsZeroState=al;exports.SpsZeroStateExamples=lf;exports.addOnChangeErrorKey=cc;exports.addOnSubmitErrorKey=dc;exports.bindProps=Zb;exports.contentOf=ft;exports.date=ba;exports.dateConstraint=mc;exports.dateRange=uc;exports.findParentBranches=fr;exports.flipPosition=wc;exports.formArray=TD;exports.formControl=wD;exports.formGroup=ED;exports.getMember=Ti;exports.getPosition=Cn;exports.resetServerContext=KC;exports.selectChildren=Vt;exports.toggleTooltipState=nr;exports.useCheckDeprecatedProps=Ic;exports.useColumnResizer=Ju;exports.useCustomValidator=DD;exports.useDidUpdateEffect=Zr;exports.useDocumentEventListener=Nc;exports.useElementId=Gn;exports.useForm=CD;exports.useGrowlers=YN;exports.useInputPopup=Ta;exports.useKeyboardSensor=Zp;exports.useMouseSensor=Jp;exports.usePatchReducer=Kt;exports.usePortal=zn;exports.useServerSideValidation=xD;exports.useSpsAction=QN;exports.useSpsForm=Rb;exports.useTouchSensor=Xp;exports.validate=va;
|