fictoan-react 1.3.6 → 1.4.0
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/dist/components/CodeBlock/CodeBlock.cjs +1 -1
- package/dist/components/CodeBlock/CodeBlock.js +13 -14
- package/dist/components/Form/Select/SelectWithSearch.cjs +1 -1
- package/dist/components/Form/Select/SelectWithSearch.js +142 -109
- package/dist/components/Modal/Modal.cjs +2 -0
- package/dist/components/Modal/Modal.d.ts +14 -0
- package/dist/components/Modal/Modal.js +54 -0
- package/dist/components/Modal/Modal.stories.d.ts +6 -0
- package/dist/components/Modal/index.cjs +2 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Modal/index.js +11 -0
- package/dist/components/Row/Row.cjs +1 -1
- package/dist/components/Row/Row.d.ts +1 -0
- package/dist/components/Row/Row.js +14 -14
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +8 -2
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../Element/Element.cjs"),n=require("../Button/Button.cjs"),r=require("../Badge/Badge.cjs"),o=require("../../prism-TTOBEoZv.cjs");var i={},a={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(e){var t,n,r=e.match(p),o=r&&r[1]?r[1].toLowerCase():"";switch(o){case s:var i=h(e);return d.test(e)||null===(t=null==(l=i.querySelector(c))?void 0:l.parentNode)||void 0===t||t.removeChild(l),f.test(e)||null===(n=null==(l=i.querySelector(u))?void 0:l.parentNode)||void 0===n||n.removeChild(l),i.querySelectorAll(s);case c:case u:var a=m(e).querySelectorAll(o);return f.test(e)&&d.test(e)?a[0].parentNode.childNodes:a;default:return b?b(e):(l=m(e,u).querySelector(u)).childNodes;var l}};var s="html",c="head",u="body",p=/<([a-zA-Z]+[0-9]?)/,d=/<head[^]*>/i,f=/<body[^]*>/i,m=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},h=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},y="object"==typeof window&&window.DOMParser;if("function"==typeof y){var g=new y;m=h=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),g.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var v=document.implementation.createHTMLDocument();m=function(e,t){if(t){var n=v.documentElement.querySelector(t);return n&&(n.innerHTML=e),v}return v.documentElement.innerHTML=e,v}}var b,x="object"==typeof document&&document.createElement("template");x&&x.content&&(b=function(e){return x.innerHTML=e,x.content.childNodes});var E,T,k,w={},S={},C={};E=C,Object.defineProperty(E,"__esModule",{value:!0}),E.Doctype=E.CDATA=E.Tag=E.Style=E.Script=E.Comment=E.Directive=E.Text=E.Root=E.isTag=E.ElementType=void 0,(k=T=E.ElementType||(E.ElementType={})).Root="root",k.Text="text",k.Directive="directive",k.Comment="comment",k.Script="script",k.Style="style",k.Tag="tag",k.CDATA="cdata",k.Doctype="doctype",E.isTag=function(e){return e.type===T.Tag||e.type===T.Script||e.type===T.Style},E.Root=T.Root,E.Text=T.Text,E.Directive=T.Directive,E.Comment=T.Comment,E.Script=T.Script,E.Style=T.Style,E.Tag=T.Tag,E.CDATA=T.CDATA,E.Doctype=T.Doctype;var O,_={},A=o.commonjsGlobal&&o.commonjsGlobal.__extends||(O=function(e,t){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},O(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),P=o.commonjsGlobal&&o.commonjsGlobal.__assign||function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},P.apply(this,arguments)};Object.defineProperty(_,"__esModule",{value:!0}),_.cloneNode=_.hasChildren=_.isDocument=_.isDirective=_.isComment=_.isText=_.isCDATA=_.isTag=_.Element=_.Document=_.CDATA=_.NodeWithChildren=_.ProcessingInstruction=_.Comment=_.Text=_.DataNode=_.Node=void 0;var N=C,j=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),X(this,e)},e}();_.Node=j;var M=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return A(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(j);_.DataNode=M;var I=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=N.ElementType.Text,t}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(M);_.Text=I;var D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=N.ElementType.Comment,t}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(M);_.Comment=D;var R=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=N.ElementType.Directive,r}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(M);_.ProcessingInstruction=R;var L=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return A(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(j);_.NodeWithChildren=L;var F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=N.ElementType.CDATA,t}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(L);_.CDATA=F;var B=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=N.ElementType.Root,t}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(L);_.Document=B;var z=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?N.ElementType.Script:"style"===t?N.ElementType.Style:N.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(L);function H(e){return(0,N.isTag)(e)}function G(e){return e.type===N.ElementType.CDATA}function V(e){return e.type===N.ElementType.Text}function U(e){return e.type===N.ElementType.Comment}function q(e){return e.type===N.ElementType.Directive}function W(e){return e.type===N.ElementType.Root}function X(e,t){var n;if(void 0===t&&(t=!1),V(e))n=new I(e.data);else if(U(e))n=new D(e.data);else if(H(e)){var r=t?Y(e.children):[],o=new z(e.name,P({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=P({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=P({},e["x-attribsPrefix"])),n=o}else if(G(e)){r=t?Y(e.children):[];var i=new F(r);r.forEach((function(e){return e.parent=i})),n=i}else if(W(e)){r=t?Y(e.children):[];var a=new B(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!q(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new R(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function Y(e){for(var t=e.map((function(e){return X(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}_.Element=z,_.isTag=H,_.isCDATA=G,_.isText=V,_.isComment=U,_.isDirective=q,_.isDocument=W,_.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},_.cloneNode=X,function(e){var t=o.commonjsGlobal&&o.commonjsGlobal.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o.commonjsGlobal&&o.commonjsGlobal.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=C,i=_;n(_,e);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?r.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===r.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();e.DomHandler=l,e.default=l}(S);var Z={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})}(Z),Object.defineProperty(w,"__esModule",{value:!0}),w.formatAttributes=J,w.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var o,i=[],a=0,l=t.length;a<l;a++){var s=t[a];switch(s.nodeType){case 1:var c=Q(s.nodeName);(o=new $.Element(c,J(s.attributes))).children=e("template"===c?s.content.childNodes:s.childNodes,o);break;case 3:o=new $.Text(s.nodeValue);break;case 8:o=new $.Comment(s.nodeValue);break;default:continue}var u=i[a-1]||null;u&&(u.next=o),o.parent=n,o.prev=u,o.next=null,i.push(o)}return r&&((o=new $.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,o.parent=n,i.unshift(o),i[1]&&(i[1].prev=i[0])),i};var $=S,K=Z;function J(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function Q(e){var t=function(e){return K.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase());return t||e}var ee=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(re),n=t?t[1]:void 0;return(0,ne.formatDOM)((0,te.default)(e),null,n)};var te=ee(l),ne=w,re=/<(![a-zA-Z\s]+)>/,oe={},ie={},ae={};function le(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}ae.SAME=0,ae.CAMELCASE=1,ae.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const se={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{se[e]=new le(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{se[e]=new le(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{se[e]=new le(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{se[e]=new le(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{se[e]=new le(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{se[e]=new le(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{se[e]=new le(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{se[e]=new le(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{se[e]=new le(e,5,!1,e.toLowerCase(),null,!1,!1)}));const ce=/[\-\:]([a-z])/g,ue=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(ce,ue);se[t]=new le(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(ce,ue);se[t]=new le(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(ce,ue);se[t]=new le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{se[e]=new le(e,1,!1,e.toLowerCase(),null,!1,!1)})),se.xlinkHref=new le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{se[e]=new le(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:pe,SAME:de,possibleStandardNames:fe}=ae,me=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),he=Object.keys(fe).reduce(((e,t)=>{const n=fe[t];return n===de?e[t]=t:n===pe?e[t.toLowerCase()]=t:e[t]=n,e}),{});ie.BOOLEAN=3,ie.BOOLEANISH_STRING=2,ie.NUMERIC=5,ie.OVERLOADED_BOOLEAN=4,ie.POSITIVE_NUMERIC=6,ie.RESERVED=0,ie.STRING=1,ie.getPropertyInfo=function(e){return se.hasOwnProperty(e)?se[e]:null},ie.isCustomAttribute=me,ie.possibleStandardNames=he;var ye={},ge={},ve=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,be=/\n/g,xe=/^\s*/,Ee=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Te=/^:\s*/,ke=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,we=/^[;\s]*/,Se=/^\s+|\s+$/g,Ce="";function Oe(e){return e?e.replace(Se,Ce):Ce}var _e=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ge,"__esModule",{value:!0});var Ae=_e((function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(be);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),c(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function l(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function s(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function c(){s(xe)}function u(e){var t;for(e=e||[];t=p();)!1!==t&&e.push(t);return e}function p(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Ce!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Ce===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function d(){var e=i(),t=s(Ee);if(t){if(p(),!s(Te))return l("property missing ':'");var n=s(ke),r=e({type:"declaration",property:Oe(t[0].replace(ve,Ce)),value:n?Oe(n[0].replace(ve,Ce)):Ce});return s(we),r}}return a.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=d();)!1!==e&&(t.push(e),u(t));return t}()}));ge.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,Ae.default)(e),o="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?t(r,i,e):i&&((n=n||{})[r]=i)}})),n};var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.camelCase=void 0;var Ne=/^--[a-zA-Z0-9-]+$/,je=/-([a-z])/g,Me=/^[^-]+$/,Ie=/^-(webkit|moz|ms|o|khtml)-/,De=/^-(ms)-/,Re=function(e,t){return t.toUpperCase()},Le=function(e,t){return"".concat(t,"-")};Pe.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Me.test(e)||Ne.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(De,Le):e.replace(Ie,Le)).replace(je,Re))};var Fe=(o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ge),Be=Pe;function ze(e,t){var n={};return e&&"string"==typeof e?((0,Fe.default)(e,(function(e,r){e&&r&&(n[(0,Be.camelCase)(e,t)]=r)})),n):n}ze.default=ze;var He=ze;!function(t){var n=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!a.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,l)}catch(k){t.style={}}else t.style={}};var r=e,i=n(He),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}}(ye),Object.defineProperty(oe,"__esModule",{value:!0}),oe.default=function(e,t){void 0===e&&(e={});var n={},r=Boolean(e.type&&We[e.type]);for(var o in e){var i=e[o];if((0,Ge.isCustomAttribute)(o))n[o]=i;else{var a=o.toLowerCase(),l=Xe(a);if(l){var s=(0,Ge.getPropertyInfo)(l);switch(Ue.includes(l)&&qe.includes(t)&&!r&&(l=Xe("default"+a)),n[l]=i,s&&s.type){case Ge.BOOLEAN:n[l]=!0;break;case Ge.OVERLOADED_BOOLEAN:""===i&&(n[l]=!0)}}else Ve.PRESERVE_CUSTOM_ATTRIBUTES&&(n[o]=i)}}return(0,Ve.setStyleProp)(e.style,n),n};var Ge=ie,Ve=ye,Ue=["checked","value"],qe=["input","select","textarea"],We={reset:!0,submit:!0};function Xe(e){return Ge.possibleStandardNames[e]}var Ye={},Ze=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,i=n.transform||Je.returnFirstArg,a=n.library||Qe,l=a.cloneElement,s=a.createElement,c=a.isValidElement,u=t.length,p=0;p<u;p++){var d=t[p];if(o){var f=n.replace(d,p);if(c(f)){u>1&&(f=l(f,{key:f.key||p})),r.push(i(f,d,p));continue}}if("text"!==d.type){var m=d,h={};et(m)?((0,Je.setStyleProp)(m.attribs.style,m.attribs),h=m.attribs):m.attribs&&(h=(0,Ke.default)(m.attribs,m.name));var y=void 0;switch(d.type){case"script":case"style":d.children[0]&&(h.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":"textarea"===d.name&&d.children[0]?h.defaultValue=d.children[0].data:d.children&&d.children.length&&(y=e(d.children,n));break;default:continue}u>1&&(h.key=p),r.push(i(s(d.name,h,y),d,p))}else{var g=!d.data.trim().length;if(g&&d.parent&&!(0,Je.canTextBeChildOfNode)(d.parent))continue;if(n.trim&&g)continue;r.push(i(d.data,d,p))}}return 1===r.length?r[0]:r};var $e=e,Ke=Ze(oe),Je=ye,Qe={cloneElement:$e.cloneElement,createElement:$e.createElement,isValidElement:$e.isValidElement};function et(e){return Je.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,Je.isCustomComponent)(e.name,e.attribs)}!function(e){var t=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,n.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]};var n=t(a);e.htmlToDOM=n.default;var r=t(oe);e.attributesToProps=r.default;var i=t(Ye);e.domToReact=i.default;var l=S;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return l.Text}});var s={lowerCaseAttributeNames:!1}}(i);const tt=o.getDefaultExportFromCjs(i),nt=tt.default||tt;var rt=["children","source","language","showCopyButton","showLineNumbers"];function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ot.apply(this,arguments)}function it(e){return(it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lt=e.forwardRef((function(i,a){var l=i.children,s=i.source,c=i.language,u=void 0===c?"json":c,p=i.showCopyButton,d=i.showLineNumbers,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,rt),m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.useState(!1),2),h=m[0],y=m[1],g="string"==typeof l?l:e.Children.toArray(l).join("");l||(g="object"===it(s)?JSON.stringify(s,null,2):null!=s?s:"");var v=[];d&&v.push("show-line-numbers");var b,x=g.split(/\r\n|\r|\n/gm);return e.createElement(t.Element,ot({"data-code-block":!0,as:"div",classNames:v},f),p?h?e.createElement(r.Badge,{className:"code-block-copied-badge",size:"tiny",shape:"rounded","aria-live":"polite"},"Copied!"):e.createElement(n.Button,{type:"button",className:"code-block-copy-button",size:"tiny",shape:"rounded",onClick:function(){navigator.clipboard.writeText(g).then((function(){y(!0),setTimeout((function(){return y(!1)}),3e3)})).catch((function(e){console.error("Could not copy text: ",e)}))},role:"button","aria-label":"Copy code to clipboard"},"Copy"):null,e.createElement("pre",{ref:a,className:"language-".concat(u)},d&&Array.from(Array(x.length).keys()).map((function(t){return e.createElement("span",{className:"line-numbers"},t+1)})),nt(void 0===(b=o.Prism.languages[u])?g:o.Prism.highlight(g,b,u))))}));exports.CodeBlock=lt;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../Element/Element.cjs"),n=require("../Button/Button.cjs"),r=require("../Badge/Badge.cjs"),o=require("../../prism-TTOBEoZv.cjs");var i={},a={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(e){var t,n,r=e.match(p),o=r&&r[1]?r[1].toLowerCase():"";switch(o){case s:var i=h(e);return d.test(e)||null===(t=null==(l=i.querySelector(c))?void 0:l.parentNode)||void 0===t||t.removeChild(l),f.test(e)||null===(n=null==(l=i.querySelector(u))?void 0:l.parentNode)||void 0===n||n.removeChild(l),i.querySelectorAll(s);case c:case u:var a=m(e).querySelectorAll(o);return f.test(e)&&d.test(e)?a[0].parentNode.childNodes:a;default:return b?b(e):(l=m(e,u).querySelector(u)).childNodes;var l}};var s="html",c="head",u="body",p=/<([a-zA-Z]+[0-9]?)/,d=/<head[^]*>/i,f=/<body[^]*>/i,m=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},h=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},y="object"==typeof window&&window.DOMParser;if("function"==typeof y){var g=new y;m=h=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),g.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var v=document.implementation.createHTMLDocument();m=function(e,t){if(t){var n=v.documentElement.querySelector(t);return n&&(n.innerHTML=e),v}return v.documentElement.innerHTML=e,v}}var b,x="object"==typeof document&&document.createElement("template");x&&x.content&&(b=function(e){return x.innerHTML=e,x.content.childNodes});var E,T,k,w={},S={},C={};E=C,Object.defineProperty(E,"__esModule",{value:!0}),E.Doctype=E.CDATA=E.Tag=E.Style=E.Script=E.Comment=E.Directive=E.Text=E.Root=E.isTag=E.ElementType=void 0,(k=T=E.ElementType||(E.ElementType={})).Root="root",k.Text="text",k.Directive="directive",k.Comment="comment",k.Script="script",k.Style="style",k.Tag="tag",k.CDATA="cdata",k.Doctype="doctype",E.isTag=function(e){return e.type===T.Tag||e.type===T.Script||e.type===T.Style},E.Root=T.Root,E.Text=T.Text,E.Directive=T.Directive,E.Comment=T.Comment,E.Script=T.Script,E.Style=T.Style,E.Tag=T.Tag,E.CDATA=T.CDATA,E.Doctype=T.Doctype;var O,_={},A=o.commonjsGlobal&&o.commonjsGlobal.__extends||(O=function(e,t){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},O(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),P=o.commonjsGlobal&&o.commonjsGlobal.__assign||function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},P.apply(this,arguments)};Object.defineProperty(_,"__esModule",{value:!0}),_.cloneNode=_.hasChildren=_.isDocument=_.isDirective=_.isComment=_.isText=_.isCDATA=_.isTag=_.Element=_.Document=_.CDATA=_.NodeWithChildren=_.ProcessingInstruction=_.Comment=_.Text=_.DataNode=_.Node=void 0;var N=C,j=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),X(this,e)},e}();_.Node=j;var M=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return A(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(j);_.DataNode=M;var I=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=N.ElementType.Text,t}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(M);_.Text=I;var D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=N.ElementType.Comment,t}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(M);_.Comment=D;var R=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=N.ElementType.Directive,r}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(M);_.ProcessingInstruction=R;var L=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return A(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(j);_.NodeWithChildren=L;var F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=N.ElementType.CDATA,t}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(L);_.CDATA=F;var B=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=N.ElementType.Root,t}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(L);_.Document=B;var z=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?N.ElementType.Script:"style"===t?N.ElementType.Style:N.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return A(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(L);function H(e){return(0,N.isTag)(e)}function G(e){return e.type===N.ElementType.CDATA}function V(e){return e.type===N.ElementType.Text}function U(e){return e.type===N.ElementType.Comment}function q(e){return e.type===N.ElementType.Directive}function W(e){return e.type===N.ElementType.Root}function X(e,t){var n;if(void 0===t&&(t=!1),V(e))n=new I(e.data);else if(U(e))n=new D(e.data);else if(H(e)){var r=t?Y(e.children):[],o=new z(e.name,P({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=P({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=P({},e["x-attribsPrefix"])),n=o}else if(G(e)){r=t?Y(e.children):[];var i=new F(r);r.forEach((function(e){return e.parent=i})),n=i}else if(W(e)){r=t?Y(e.children):[];var a=new B(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!q(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new R(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function Y(e){for(var t=e.map((function(e){return X(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}_.Element=z,_.isTag=H,_.isCDATA=G,_.isText=V,_.isComment=U,_.isDirective=q,_.isDocument=W,_.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},_.cloneNode=X,function(e){var t=o.commonjsGlobal&&o.commonjsGlobal.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o.commonjsGlobal&&o.commonjsGlobal.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=C,i=_;n(_,e);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?r.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===r.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();e.DomHandler=l,e.default=l}(S);var Z={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})}(Z),Object.defineProperty(w,"__esModule",{value:!0}),w.formatAttributes=J,w.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var o,i=[],a=0,l=t.length;a<l;a++){var s=t[a];switch(s.nodeType){case 1:var c=Q(s.nodeName);(o=new $.Element(c,J(s.attributes))).children=e("template"===c?s.content.childNodes:s.childNodes,o);break;case 3:o=new $.Text(s.nodeValue);break;case 8:o=new $.Comment(s.nodeValue);break;default:continue}var u=i[a-1]||null;u&&(u.next=o),o.parent=n,o.prev=u,o.next=null,i.push(o)}return r&&((o=new $.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,o.parent=n,i.unshift(o),i[1]&&(i[1].prev=i[0])),i};var $=S,K=Z;function J(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function Q(e){var t=function(e){return K.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase());return t||e}var ee=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(re),n=t?t[1]:void 0;return(0,ne.formatDOM)((0,te.default)(e),null,n)};var te=ee(l),ne=w,re=/<(![a-zA-Z\s]+)>/,oe={},ie={},ae={};function le(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}ae.SAME=0,ae.CAMELCASE=1,ae.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const se={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{se[e]=new le(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{se[e]=new le(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{se[e]=new le(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{se[e]=new le(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{se[e]=new le(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{se[e]=new le(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{se[e]=new le(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{se[e]=new le(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{se[e]=new le(e,5,!1,e.toLowerCase(),null,!1,!1)}));const ce=/[\-\:]([a-z])/g,ue=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(ce,ue);se[t]=new le(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(ce,ue);se[t]=new le(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(ce,ue);se[t]=new le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{se[e]=new le(e,1,!1,e.toLowerCase(),null,!1,!1)})),se.xlinkHref=new le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{se[e]=new le(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:pe,SAME:de,possibleStandardNames:fe}=ae,me=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),he=Object.keys(fe).reduce(((e,t)=>{const n=fe[t];return n===de?e[t]=t:n===pe?e[t.toLowerCase()]=t:e[t]=n,e}),{});ie.BOOLEAN=3,ie.BOOLEANISH_STRING=2,ie.NUMERIC=5,ie.OVERLOADED_BOOLEAN=4,ie.POSITIVE_NUMERIC=6,ie.RESERVED=0,ie.STRING=1,ie.getPropertyInfo=function(e){return se.hasOwnProperty(e)?se[e]:null},ie.isCustomAttribute=me,ie.possibleStandardNames=he;var ye={},ge={},ve=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,be=/\n/g,xe=/^\s*/,Ee=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Te=/^:\s*/,ke=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,we=/^[;\s]*/,Se=/^\s+|\s+$/g,Ce="";function Oe(e){return e?e.replace(Se,Ce):Ce}var _e=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ge,"__esModule",{value:!0}),ge.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,Ae.default)(e),o="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?t(r,i,e):i&&((n=n||{})[r]=i)}})),n};var Ae=_e((function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(be);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),c(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function l(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function s(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function c(){s(xe)}function u(e){var t;for(e=e||[];t=p();)!1!==t&&e.push(t);return e}function p(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Ce!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Ce===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function d(){var e=i(),t=s(Ee);if(t){if(p(),!s(Te))return l("property missing ':'");var n=s(ke),r=e({type:"declaration",property:Oe(t[0].replace(ve,Ce)),value:n?Oe(n[0].replace(ve,Ce)):Ce});return s(we),r}}return a.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=d();)!1!==e&&(t.push(e),u(t));return t}()})),Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.camelCase=void 0;var Ne=/^--[a-zA-Z0-9_-]+$/,je=/-([a-z])/g,Me=/^[^-]+$/,Ie=/^-(webkit|moz|ms|o|khtml)-/,De=/^-(ms)-/,Re=function(e,t){return t.toUpperCase()},Le=function(e,t){return"".concat(t,"-")};Pe.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Me.test(e)||Ne.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(De,Le):e.replace(Ie,Le)).replace(je,Re))};var Fe=(o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ge),Be=Pe;function ze(e,t){var n={};return e&&"string"==typeof e?((0,Fe.default)(e,(function(e,r){e&&r&&(n[(0,Be.camelCase)(e,t)]=r)})),n):n}ze.default=ze;var He=ze;!function(t){var n=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!a.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,l)}catch(k){t.style={}}else t.style={}};var r=e,i=n(He),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}}(ye),Object.defineProperty(oe,"__esModule",{value:!0}),oe.default=function(e,t){void 0===e&&(e={});var n={},r=Boolean(e.type&&We[e.type]);for(var o in e){var i=e[o];if((0,Ge.isCustomAttribute)(o))n[o]=i;else{var a=o.toLowerCase(),l=Xe(a);if(l){var s=(0,Ge.getPropertyInfo)(l);switch(Ue.includes(l)&&qe.includes(t)&&!r&&(l=Xe("default"+a)),n[l]=i,s&&s.type){case Ge.BOOLEAN:n[l]=!0;break;case Ge.OVERLOADED_BOOLEAN:""===i&&(n[l]=!0)}}else Ve.PRESERVE_CUSTOM_ATTRIBUTES&&(n[o]=i)}}return(0,Ve.setStyleProp)(e.style,n),n};var Ge=ie,Ve=ye,Ue=["checked","value"],qe=["input","select","textarea"],We={reset:!0,submit:!0};function Xe(e){return Ge.possibleStandardNames[e]}var Ye={},Ze=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,i=n.transform||Je.returnFirstArg,a=n.library||Qe,l=a.cloneElement,s=a.createElement,c=a.isValidElement,u=t.length,p=0;p<u;p++){var d=t[p];if(o){var f=n.replace(d,p);if(c(f)){u>1&&(f=l(f,{key:f.key||p})),r.push(i(f,d,p));continue}}if("text"!==d.type){var m=d,h={};et(m)?((0,Je.setStyleProp)(m.attribs.style,m.attribs),h=m.attribs):m.attribs&&(h=(0,Ke.default)(m.attribs,m.name));var y=void 0;switch(d.type){case"script":case"style":d.children[0]&&(h.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":"textarea"===d.name&&d.children[0]?h.defaultValue=d.children[0].data:d.children&&d.children.length&&(y=e(d.children,n));break;default:continue}u>1&&(h.key=p),r.push(i(s(d.name,h,y),d,p))}else{var g=!d.data.trim().length;if(g&&d.parent&&!(0,Je.canTextBeChildOfNode)(d.parent))continue;if(n.trim&&g)continue;r.push(i(d.data,d,p))}}return 1===r.length?r[0]:r};var $e=e,Ke=Ze(oe),Je=ye,Qe={cloneElement:$e.cloneElement,createElement:$e.createElement,isValidElement:$e.isValidElement};function et(e){return Je.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,Je.isCustomComponent)(e.name,e.attribs)}!function(e){var t=o.commonjsGlobal&&o.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,n.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]};var n=t(a);e.htmlToDOM=n.default;var r=t(oe);e.attributesToProps=r.default;var i=t(Ye);e.domToReact=i.default;var l=S;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return l.Text}});var s={lowerCaseAttributeNames:!1}}(i);const tt=o.getDefaultExportFromCjs(i),nt=tt.default||tt;var rt=["children","source","language","showCopyButton","showLineNumbers"];function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ot.apply(this,arguments)}function it(e){return(it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lt=e.forwardRef((function(i,a){var l=i.children,s=i.source,c=i.language,u=void 0===c?"json":c,p=i.showCopyButton,d=i.showLineNumbers,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,rt),m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.useState(!1),2),h=m[0],y=m[1],g="string"==typeof l?l:e.Children.toArray(l).join("");l||(g="object"===it(s)?JSON.stringify(s,null,2):null!=s?s:"");var v=[];d&&v.push("show-line-numbers");var b,x=g.split(/\r\n|\r|\n/gm);return e.createElement(t.Element,ot({"data-code-block":!0,as:"div",classNames:v},f),p?h?e.createElement(r.Badge,{className:"code-block-copied-badge",size:"tiny",shape:"rounded","aria-live":"polite"},"Copied!"):e.createElement(n.Button,{type:"button",className:"code-block-copy-button",size:"tiny",shape:"rounded",onClick:function(){navigator.clipboard.writeText(g).then((function(){y(!0),setTimeout((function(){return y(!1)}),3e3)})).catch((function(e){console.error("Could not copy text: ",e)}))},role:"button","aria-label":"Copy code to clipboard"},"Copy"):null,e.createElement("pre",{ref:a,className:"language-".concat(u)},d&&Array.from(Array(x.length).keys()).map((function(t){return e.createElement("span",{className:"line-numbers"},t+1)})),nt(void 0===(b=o.Prism.languages[u])?g:o.Prism.highlight(g,b,u))))}));exports.CodeBlock=lt;
|
|
@@ -439,7 +439,18 @@ function Ae(e4) {
|
|
|
439
439
|
var Ne = i && i.__importDefault || function(e4) {
|
|
440
440
|
return e4 && e4.__esModule ? e4 : { default: e4 };
|
|
441
441
|
};
|
|
442
|
-
Object.defineProperty(be, "__esModule", { value: true })
|
|
442
|
+
Object.defineProperty(be, "__esModule", { value: true }), be.default = function(e4, t2) {
|
|
443
|
+
var n2 = null;
|
|
444
|
+
if (!e4 || "string" != typeof e4)
|
|
445
|
+
return n2;
|
|
446
|
+
var r2 = (0, Pe.default)(e4), o2 = "function" == typeof t2;
|
|
447
|
+
return r2.forEach(function(e5) {
|
|
448
|
+
if ("declaration" === e5.type) {
|
|
449
|
+
var r3 = e5.property, i2 = e5.value;
|
|
450
|
+
o2 ? t2(r3, i2, e5) : i2 && ((n2 = n2 || {})[r3] = i2);
|
|
451
|
+
}
|
|
452
|
+
}), n2;
|
|
453
|
+
};
|
|
443
454
|
var Pe = Ne(function(e4, t2) {
|
|
444
455
|
if ("string" != typeof e4)
|
|
445
456
|
throw new TypeError("First argument must be a string");
|
|
@@ -510,21 +521,9 @@ var Pe = Ne(function(e4, t2) {
|
|
|
510
521
|
return t3;
|
|
511
522
|
}();
|
|
512
523
|
});
|
|
513
|
-
be.default = function(e4, t2) {
|
|
514
|
-
var n2 = null;
|
|
515
|
-
if (!e4 || "string" != typeof e4)
|
|
516
|
-
return n2;
|
|
517
|
-
var r2 = (0, Pe.default)(e4), o2 = "function" == typeof t2;
|
|
518
|
-
return r2.forEach(function(e5) {
|
|
519
|
-
if ("declaration" === e5.type) {
|
|
520
|
-
var r3 = e5.property, i2 = e5.value;
|
|
521
|
-
o2 ? t2(r3, i2, e5) : i2 && ((n2 = n2 || {})[r3] = i2);
|
|
522
|
-
}
|
|
523
|
-
}), n2;
|
|
524
|
-
};
|
|
525
524
|
var Ie = {};
|
|
526
525
|
Object.defineProperty(Ie, "__esModule", { value: true }), Ie.camelCase = void 0;
|
|
527
|
-
var Me = /^--[a-zA-Z0-
|
|
526
|
+
var Me = /^--[a-zA-Z0-9_-]+$/, De = /-([a-z])/g, je = /^[^-]+$/, Re = /^-(webkit|moz|ms|o|khtml)-/, Le = /^-(ms)-/, Fe = function(e4, t2) {
|
|
528
527
|
return t2.toUpperCase();
|
|
529
528
|
}, Be = function(e4, t2) {
|
|
530
529
|
return "".concat(t2, "-");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../Element/Tags.cjs"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../../Element/Tags.cjs"),n=require("../InputField/InputField.cjs"),r=require("../BaseInputComponent/BaseInputComponent.cjs");require("../../Element/Element.cjs"),require("../InputLabel/InputLabel.cjs"),require("../FormItem/FormItem.cjs");var a=["options","label","placeholder","id"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,l,i=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(s){u=!0,a=s}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=e.forwardRef((function(i,c){var u=i.options,s=i.label;i.placeholder;var f=i.id,p=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(i,a),d=l(e.useState(!1),2),m=d[0],b=d[1],v=l(e.useState(null),2),h=v[0],y=v[1],w=l(e.useState(""),2),g=w[0],E=w[1],j=l(e.useState(-1),2),I=j[0],O=j[1],S=e.useRef(),x=e.useRef(null),M=c||S,A=function(e,t){if(!t)return e;var n=t.toLowerCase().trim(),r=Math.floor(n.length/2);return e.map((function(e){var t=e.label.toLowerCase(),r=function(e,t){var n=[],r=e.length,a=t.length;if(0===r)return a;if(0===a)return r;for(var o=0;o<=a;o++)n[o]=[o];for(var l=0;l<=r;l++)n[0][l]=l;for(var i=1;i<=a;i++)for(var c=1;c<=r;c++)t[i-1]===e[c-1]?n[i][c]=n[i-1][c-1]:n[i][c]=Math.min(n[i-1][c]+1,n[i][c-1]+1,n[i-1][c-1]+1);return n[a][r]}(n,t),a=t.split(/[\s\-_]+/),o=n.split(/[\s\-_]+/),l=t.includes(n)||o.every((function(e){return a.some((function(t){return t.startsWith(e)}))})),i=t.split(/[\s\-_]+/).map((function(e){return e.slice(0,2)})).join("").toLowerCase();return{option:e,distance:r,isPartialMatch:l,isAcronymMatch:function(e,t){for(var n=0,r=0;n<e.length&&r<t.length;)e[n]===t[r]&&n++,r++;return n===e.length}(n,i)}})).filter((function(e){var t=e.distance,n=e.isPartialMatch,a=e.isAcronymMatch;return n||a||t<=r})).sort((function(e,t){return e.isPartialMatch&&!t.isPartialMatch?-1:!e.isPartialMatch&&t.isPartialMatch?1:e.isAcronymMatch&&!t.isAcronymMatch?-1:!e.isAcronymMatch&&t.isAcronymMatch?1:e.distance-t.distance})).map((function(e){return e.option}))}(u,g),D=function(e){if(!e.disabled){y(e),k(e),b(!1),E(""),O(-1);var t=document.getElementById("".concat(f,"-button"));null==t||t.focus()}},k=function(e){var t,n=document.getElementById(e.value);if(n){n.type="text",n.hidden=!0;var r=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");null==r||null===(t=r.set)||void 0===t||t.call(n,e.value);var a=new Event("input",{bubbles:!0});n.dispatchEvent(a),n.type="hidden",n.hidden=!1}},P=function(e){switch(e.key){case"ArrowDown":e.preventDefault(),m?O((function(e){return e<A.length-1?e+1:e})):(b(!0),O(0));break;case"ArrowUp":e.preventDefault(),O((function(e){return e>0?e-1:e}));break;case"Enter":e.preventDefault(),I>=0&&A[I]&&D(A[I]);break;case"Escape":e.preventDefault(),b(!1),O(-1);break;case" ":m||(e.preventDefault(),b(!0),O(0));break;case"Home":m&&(e.preventDefault(),O(0));break;case"End":m&&(e.preventDefault(),O(A.length-1))}};return e.useEffect((function(){var e=function(e){M.current&&!M.current.contains(e.target)&&(b(!1),O(-1))};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}),[]),e.useEffect((function(){m&&x.current&&x.current.focus()}),[m]),e.useEffect((function(){if(I>=0){var e=document.querySelector('[data-index="'.concat(I,'"]'));null==e||e.scrollIntoView({block:"nearest"})}}),[I]),e.createElement(r.BaseInputComponent,o({"data-select-with-search":!0,className:"sws-wrapper",ref:M},p),s&&e.createElement("label",{id:"".concat(f,"-label"),htmlFor:"".concat(f,"-listbox"),className:"sws-label"},s),e.createElement(t.Div,{className:"sws-display",onClick:function(){return b(!m)},onKeyDown:P,"aria-haspopup":"listbox","aria-expanded":m,"aria-labelledby":s?"".concat(f,"-label"):void 0,"aria-controls":m?"".concat(f,"-listbox"):void 0},h?h.label:"Select an option"),m&&e.createElement(t.Div,{className:"sws-dropdown",role:"presentation"},e.createElement(n.InputField,{type:"text",ref:x,className:"sws-input",placeholder:"Search",value:g,onChange:function(e){E(e.target.value),O(0)},onKeyDown:P,"aria-controls":"".concat(f,"-listbox")}),e.createElement("ul",{id:"".concat(f,"-listbox"),className:"sws-options",role:"listbox","aria-label":s||"Select options",tabIndex:-1},A.length>0?A.map((function(t,n){return e.createElement("li",{key:t.value,id:"".concat(f,"-option-").concat(t.value),className:"sws-option ".concat(t.disabled?"disabled":""," ").concat(I===n?"active":""),role:"option","aria-selected":(null==h?void 0:h.value)===t.value,"aria-disabled":t.disabled,onClick:function(){return D(t)},"data-index":n},t.customLabel||t.label,e.createElement("input",{type:"hidden",id:t.value}))})):e.createElement("li",{className:"sws-option disabled",role:"alert"},"No matches found"))))}));exports.SelectWithSearch=c;
|
|
@@ -1,90 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import e, { useState as t, useRef as
|
|
3
|
-
import { Div as
|
|
4
|
-
import { InputField as
|
|
2
|
+
import e, { useState as t, useRef as n, useEffect as r } from "react";
|
|
3
|
+
import { Div as a } from "../../Element/Tags.js";
|
|
4
|
+
import { InputField as o } from "../InputField/InputField.js";
|
|
5
5
|
import { BaseInputComponent as l } from "../BaseInputComponent/BaseInputComponent.js";
|
|
6
6
|
import "../../Element/Element.js";
|
|
7
7
|
import "../InputLabel/InputLabel.js";
|
|
8
8
|
import "../FormItem/FormItem.js";
|
|
9
|
-
|
|
10
|
-
return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
|
|
11
|
-
return typeof e3;
|
|
12
|
-
} : function(e3) {
|
|
13
|
-
return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
|
|
14
|
-
})(e2);
|
|
15
|
-
}
|
|
16
|
-
var u = ["options"];
|
|
9
|
+
var i = ["options", "label", "placeholder", "id"];
|
|
17
10
|
function c() {
|
|
18
11
|
return c = Object.assign ? Object.assign.bind() : function(e2) {
|
|
19
12
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
20
|
-
var
|
|
21
|
-
for (var
|
|
22
|
-
Object.prototype.hasOwnProperty.call(
|
|
13
|
+
var n2 = arguments[t2];
|
|
14
|
+
for (var r2 in n2)
|
|
15
|
+
Object.prototype.hasOwnProperty.call(n2, r2) && (e2[r2] = n2[r2]);
|
|
23
16
|
}
|
|
24
17
|
return e2;
|
|
25
18
|
}, c.apply(this, arguments);
|
|
26
19
|
}
|
|
27
|
-
function
|
|
28
|
-
var r2 = Object.keys(e2);
|
|
29
|
-
if (Object.getOwnPropertySymbols) {
|
|
30
|
-
var n2 = Object.getOwnPropertySymbols(e2);
|
|
31
|
-
t2 && (n2 = n2.filter(function(t3) {
|
|
32
|
-
return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
|
|
33
|
-
})), r2.push.apply(r2, n2);
|
|
34
|
-
}
|
|
35
|
-
return r2;
|
|
36
|
-
}
|
|
37
|
-
function f(e2) {
|
|
38
|
-
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
39
|
-
var r2 = null != arguments[t2] ? arguments[t2] : {};
|
|
40
|
-
t2 % 2 ? s(Object(r2), true).forEach(function(t3) {
|
|
41
|
-
p(e2, t3, r2[t3]);
|
|
42
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(r2)) : s(Object(r2)).forEach(function(t3) {
|
|
43
|
-
Object.defineProperty(e2, t3, Object.getOwnPropertyDescriptor(r2, t3));
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return e2;
|
|
47
|
-
}
|
|
48
|
-
function p(e2, t2, r2) {
|
|
49
|
-
var n2;
|
|
50
|
-
return n2 = function(e3, t3) {
|
|
51
|
-
if ("object" != i(e3) || !e3)
|
|
52
|
-
return e3;
|
|
53
|
-
var r3 = e3[Symbol.toPrimitive];
|
|
54
|
-
if (void 0 !== r3) {
|
|
55
|
-
var n3 = r3.call(e3, t3 || "default");
|
|
56
|
-
if ("object" != i(n3))
|
|
57
|
-
return n3;
|
|
58
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
59
|
-
}
|
|
60
|
-
return ("string" === t3 ? String : Number)(e3);
|
|
61
|
-
}(t2, "string"), (t2 = "symbol" == i(n2) ? n2 : String(n2)) in e2 ? Object.defineProperty(e2, t2, { value: r2, enumerable: true, configurable: true, writable: true }) : e2[t2] = r2, e2;
|
|
62
|
-
}
|
|
63
|
-
function m(e2, t2) {
|
|
20
|
+
function u(e2, t2) {
|
|
64
21
|
return function(e3) {
|
|
65
22
|
if (Array.isArray(e3))
|
|
66
23
|
return e3;
|
|
67
24
|
}(e2) || function(e3, t3) {
|
|
68
|
-
var
|
|
69
|
-
if (null !=
|
|
70
|
-
var
|
|
25
|
+
var n2 = null == e3 ? null : "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"];
|
|
26
|
+
if (null != n2) {
|
|
27
|
+
var r2, a2, o2, l2, i2 = [], c2 = true, u2 = false;
|
|
71
28
|
try {
|
|
72
|
-
if (
|
|
73
|
-
if (Object(
|
|
29
|
+
if (o2 = (n2 = n2.call(e3)).next, 0 === t3) {
|
|
30
|
+
if (Object(n2) !== n2)
|
|
74
31
|
return;
|
|
75
|
-
|
|
32
|
+
c2 = false;
|
|
76
33
|
} else
|
|
77
|
-
for (; !(
|
|
34
|
+
for (; !(c2 = (r2 = o2.call(n2)).done) && (i2.push(r2.value), i2.length !== t3); c2 = true)
|
|
78
35
|
;
|
|
79
36
|
} catch (e4) {
|
|
80
|
-
|
|
37
|
+
u2 = true, a2 = e4;
|
|
81
38
|
} finally {
|
|
82
39
|
try {
|
|
83
|
-
if (!
|
|
40
|
+
if (!c2 && null != n2.return && (l2 = n2.return(), Object(l2) !== l2))
|
|
84
41
|
return;
|
|
85
42
|
} finally {
|
|
86
|
-
if (
|
|
87
|
-
throw
|
|
43
|
+
if (u2)
|
|
44
|
+
throw a2;
|
|
88
45
|
}
|
|
89
46
|
}
|
|
90
47
|
return i2;
|
|
@@ -93,73 +50,149 @@ function m(e2, t2) {
|
|
|
93
50
|
if (!e3)
|
|
94
51
|
return;
|
|
95
52
|
if ("string" == typeof e3)
|
|
96
|
-
return
|
|
97
|
-
var
|
|
98
|
-
"Object" ===
|
|
99
|
-
if ("Map" ===
|
|
53
|
+
return s(e3, t3);
|
|
54
|
+
var n2 = Object.prototype.toString.call(e3).slice(8, -1);
|
|
55
|
+
"Object" === n2 && e3.constructor && (n2 = e3.constructor.name);
|
|
56
|
+
if ("Map" === n2 || "Set" === n2)
|
|
100
57
|
return Array.from(e3);
|
|
101
|
-
if ("Arguments" ===
|
|
102
|
-
return
|
|
58
|
+
if ("Arguments" === n2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
|
|
59
|
+
return s(e3, t3);
|
|
103
60
|
}(e2, t2) || function() {
|
|
104
61
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
105
62
|
}();
|
|
106
63
|
}
|
|
107
|
-
function
|
|
64
|
+
function s(e2, t2) {
|
|
108
65
|
(null == t2 || t2 > e2.length) && (t2 = e2.length);
|
|
109
|
-
for (var
|
|
110
|
-
n2
|
|
111
|
-
return
|
|
66
|
+
for (var n2 = 0, r2 = new Array(t2); n2 < t2; n2++)
|
|
67
|
+
r2[n2] = e2[n2];
|
|
68
|
+
return r2;
|
|
112
69
|
}
|
|
113
|
-
function
|
|
70
|
+
function f(e2, t2) {
|
|
114
71
|
if (null == e2)
|
|
115
72
|
return {};
|
|
116
|
-
var
|
|
73
|
+
var n2, r2, a2 = function(e3, t3) {
|
|
117
74
|
if (null == e3)
|
|
118
75
|
return {};
|
|
119
|
-
var
|
|
120
|
-
for (
|
|
121
|
-
|
|
122
|
-
return
|
|
76
|
+
var n3, r3, a3 = {}, o3 = Object.keys(e3);
|
|
77
|
+
for (r3 = 0; r3 < o3.length; r3++)
|
|
78
|
+
n3 = o3[r3], t3.indexOf(n3) >= 0 || (a3[n3] = e3[n3]);
|
|
79
|
+
return a3;
|
|
123
80
|
}(e2, t2);
|
|
124
81
|
if (Object.getOwnPropertySymbols) {
|
|
125
|
-
var
|
|
126
|
-
for (
|
|
127
|
-
|
|
82
|
+
var o2 = Object.getOwnPropertySymbols(e2);
|
|
83
|
+
for (r2 = 0; r2 < o2.length; r2++)
|
|
84
|
+
n2 = o2[r2], t2.indexOf(n2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, n2) && (a2[n2] = e2[n2]);
|
|
128
85
|
}
|
|
129
|
-
return
|
|
86
|
+
return a2;
|
|
130
87
|
}
|
|
131
|
-
var
|
|
132
|
-
|
|
133
|
-
return
|
|
134
|
-
|
|
135
|
-
|
|
88
|
+
var p = function(e2, t2) {
|
|
89
|
+
if (!t2)
|
|
90
|
+
return e2;
|
|
91
|
+
var n2 = t2.toLowerCase().trim(), r2 = Math.floor(n2.length / 2);
|
|
92
|
+
return e2.map(function(e3) {
|
|
93
|
+
var t3 = e3.label.toLowerCase(), r3 = function(e4, t4) {
|
|
94
|
+
var n3 = [], r4 = e4.length, a3 = t4.length;
|
|
95
|
+
if (0 === r4)
|
|
96
|
+
return a3;
|
|
97
|
+
if (0 === a3)
|
|
98
|
+
return r4;
|
|
99
|
+
for (var o3 = 0; o3 <= a3; o3++)
|
|
100
|
+
n3[o3] = [o3];
|
|
101
|
+
for (var l3 = 0; l3 <= r4; l3++)
|
|
102
|
+
n3[0][l3] = l3;
|
|
103
|
+
for (var i3 = 1; i3 <= a3; i3++)
|
|
104
|
+
for (var c2 = 1; c2 <= r4; c2++)
|
|
105
|
+
t4[i3 - 1] === e4[c2 - 1] ? n3[i3][c2] = n3[i3 - 1][c2 - 1] : n3[i3][c2] = Math.min(n3[i3 - 1][c2] + 1, n3[i3][c2 - 1] + 1, n3[i3 - 1][c2 - 1] + 1);
|
|
106
|
+
return n3[a3][r4];
|
|
107
|
+
}(n2, t3), a2 = t3.split(/[\s\-_]+/), o2 = n2.split(/[\s\-_]+/), l2 = t3.includes(n2) || o2.every(function(e4) {
|
|
108
|
+
return a2.some(function(t4) {
|
|
109
|
+
return t4.startsWith(e4);
|
|
110
|
+
});
|
|
111
|
+
}), i2 = t3.split(/[\s\-_]+/).map(function(e4) {
|
|
112
|
+
return e4.slice(0, 2);
|
|
113
|
+
}).join("").toLowerCase();
|
|
114
|
+
return { option: e3, distance: r3, isPartialMatch: l2, isAcronymMatch: function(e4, t4) {
|
|
115
|
+
for (var n3 = 0, r4 = 0; n3 < e4.length && r4 < t4.length; )
|
|
116
|
+
e4[n3] === t4[r4] && n3++, r4++;
|
|
117
|
+
return n3 === e4.length;
|
|
118
|
+
}(n2, i2) };
|
|
119
|
+
}).filter(function(e3) {
|
|
120
|
+
var t3 = e3.distance, n3 = e3.isPartialMatch, a2 = e3.isAcronymMatch;
|
|
121
|
+
return n3 || a2 || t3 <= r2;
|
|
122
|
+
}).sort(function(e3, t3) {
|
|
123
|
+
return e3.isPartialMatch && !t3.isPartialMatch ? -1 : !e3.isPartialMatch && t3.isPartialMatch ? 1 : e3.isAcronymMatch && !t3.isAcronymMatch ? -1 : !e3.isAcronymMatch && t3.isAcronymMatch ? 1 : e3.distance - t3.distance;
|
|
124
|
+
}).map(function(e3) {
|
|
125
|
+
return e3.option;
|
|
136
126
|
});
|
|
137
|
-
|
|
127
|
+
}, d = /* @__PURE__ */ e.forwardRef(function(s2, d2) {
|
|
128
|
+
var m = s2.options, b = s2.label;
|
|
129
|
+
s2.placeholder;
|
|
130
|
+
var v = s2.id, h = f(s2, i), y = u(t(false), 2), w = y[0], g = y[1], E = u(t(null), 2), j = E[0], O = E[1], I = u(t(""), 2), x = I[0], M = I[1], A = u(t(-1), 2), k = A[0], D = A[1], S = n(), P = n(null), C = d2 || S, L = p(m, x), N = function(e2) {
|
|
131
|
+
if (!e2.disabled) {
|
|
132
|
+
O(e2), F(e2), g(false), M(""), D(-1);
|
|
133
|
+
var t2 = document.getElementById("".concat(v, "-button"));
|
|
134
|
+
null == t2 || t2.focus();
|
|
135
|
+
}
|
|
136
|
+
}, F = function(e2) {
|
|
137
|
+
var t2, n2 = document.getElementById(e2.value);
|
|
138
|
+
if (n2) {
|
|
139
|
+
n2.type = "text", n2.hidden = true;
|
|
140
|
+
var r2 = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value");
|
|
141
|
+
null == r2 || null === (t2 = r2.set) || void 0 === t2 || t2.call(n2, e2.value);
|
|
142
|
+
var a2 = new Event("input", { bubbles: true });
|
|
143
|
+
n2.dispatchEvent(a2), n2.type = "hidden", n2.hidden = false;
|
|
144
|
+
}
|
|
145
|
+
}, B = function(e2) {
|
|
146
|
+
switch (e2.key) {
|
|
147
|
+
case "ArrowDown":
|
|
148
|
+
e2.preventDefault(), w ? D(function(e3) {
|
|
149
|
+
return e3 < L.length - 1 ? e3 + 1 : e3;
|
|
150
|
+
}) : (g(true), D(0));
|
|
151
|
+
break;
|
|
152
|
+
case "ArrowUp":
|
|
153
|
+
e2.preventDefault(), D(function(e3) {
|
|
154
|
+
return e3 > 0 ? e3 - 1 : e3;
|
|
155
|
+
});
|
|
156
|
+
break;
|
|
157
|
+
case "Enter":
|
|
158
|
+
e2.preventDefault(), k >= 0 && L[k] && N(L[k]);
|
|
159
|
+
break;
|
|
160
|
+
case "Escape":
|
|
161
|
+
e2.preventDefault(), g(false), D(-1);
|
|
162
|
+
break;
|
|
163
|
+
case " ":
|
|
164
|
+
w || (e2.preventDefault(), g(true), D(0));
|
|
165
|
+
break;
|
|
166
|
+
case "Home":
|
|
167
|
+
w && (e2.preventDefault(), D(0));
|
|
168
|
+
break;
|
|
169
|
+
case "End":
|
|
170
|
+
w && (e2.preventDefault(), D(L.length - 1));
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
return r(function() {
|
|
138
174
|
var e2 = function(e3) {
|
|
139
|
-
|
|
175
|
+
C.current && !C.current.contains(e3.target) && (g(false), D(-1));
|
|
140
176
|
};
|
|
141
177
|
return document.addEventListener("mousedown", e2), function() {
|
|
142
|
-
document.removeEventListener("mousedown", e2);
|
|
178
|
+
return document.removeEventListener("mousedown", e2);
|
|
143
179
|
};
|
|
144
|
-
}, []),
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}(t2);
|
|
161
|
-
} }, t2.customLabel ? t2.customLabel : t2.label), /* @__PURE__ */ e.createElement(a, { type: "hidden", id: t2.value }));
|
|
162
|
-
}) : /* @__PURE__ */ e.createElement("li", { className: "sws-option disabled" }, "No matches found"))));
|
|
180
|
+
}, []), r(function() {
|
|
181
|
+
w && P.current && P.current.focus();
|
|
182
|
+
}, [w]), r(function() {
|
|
183
|
+
if (k >= 0) {
|
|
184
|
+
var e2 = document.querySelector('[data-index="'.concat(k, '"]'));
|
|
185
|
+
null == e2 || e2.scrollIntoView({ block: "nearest" });
|
|
186
|
+
}
|
|
187
|
+
}, [k]), /* @__PURE__ */ e.createElement(l, c({ "data-select-with-search": true, className: "sws-wrapper", ref: C }, h), b && /* @__PURE__ */ e.createElement("label", { id: "".concat(v, "-label"), htmlFor: "".concat(v, "-listbox"), className: "sws-label" }, b), /* @__PURE__ */ e.createElement(a, { className: "sws-display", onClick: function() {
|
|
188
|
+
return g(!w);
|
|
189
|
+
}, onKeyDown: B, "aria-haspopup": "listbox", "aria-expanded": w, "aria-labelledby": b ? "".concat(v, "-label") : void 0, "aria-controls": w ? "".concat(v, "-listbox") : void 0 }, j ? j.label : "Select an option"), w && /* @__PURE__ */ e.createElement(a, { className: "sws-dropdown", role: "presentation" }, /* @__PURE__ */ e.createElement(o, { type: "text", ref: P, className: "sws-input", placeholder: "Search", value: x, onChange: function(e2) {
|
|
190
|
+
M(e2.target.value), D(0);
|
|
191
|
+
}, onKeyDown: B, "aria-controls": "".concat(v, "-listbox") }), /* @__PURE__ */ e.createElement("ul", { id: "".concat(v, "-listbox"), className: "sws-options", role: "listbox", "aria-label": b || "Select options", tabIndex: -1 }, L.length > 0 ? L.map(function(t2, n2) {
|
|
192
|
+
return e.createElement("li", { key: t2.value, id: "".concat(v, "-option-").concat(t2.value), className: "sws-option ".concat(t2.disabled ? "disabled" : "", " ").concat(k === n2 ? "active" : ""), role: "option", "aria-selected": (null == j ? void 0 : j.value) === t2.value, "aria-disabled": t2.disabled, onClick: function() {
|
|
193
|
+
return N(t2);
|
|
194
|
+
}, "data-index": n2 }, t2.customLabel || t2.label, /* @__PURE__ */ e.createElement("input", { type: "hidden", id: t2.value }));
|
|
195
|
+
}) : /* @__PURE__ */ e.createElement("li", { className: "sws-option disabled", role: "alert" }, "No matches found"))));
|
|
163
196
|
});
|
|
164
197
|
export {
|
|
165
198
|
d as SelectWithSearch
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("../Element/Element.cjs"),o=require("../Typography/Text.cjs");var t=["id","children","classNames","isDismissible","showBackdrop","blurBackdrop"];function n(){return n=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},n.apply(this,arguments)}var a=e.forwardRef((function(a,s){var l=a.id,i=a.children,u=a.classNames,d=void 0===u?[]:u,p=a.isDismissible,m=a.showBackdrop,f=a.blurBackdrop,b=function(e,r){if(null==e)return{};var o,t,n=function(e,r){if(null==e)return{};var o,t,n={},a=Object.keys(e);for(t=0;t<a.length;t++)o=a[t],r.indexOf(o)>=0||(n[o]=e[o]);return n}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)o=a[t],r.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(a,t);return m&&d.push("show-backdrop"),f&&d.push("blur-backdrop"),e.createElement(r.Element,n({as:"div",id:l,"data-modal":!0,popover:p?"auto":"manual",ref:s,classNames:d},b),p&&e.createElement(o.Text,{className:"dismiss-button",onClick:function(){return c(l)}},"×"),i)})),c=function(e){var r=document.querySelector("#".concat(e,"[data-modal]"));r instanceof HTMLElement&&r.hidePopover()};exports.Modal=a,exports.hideModal=c,exports.showModal=function(e){var r=document.querySelector("#".concat(e,"[data-modal]"));r instanceof HTMLElement&&r.showPopover()},exports.toggleModal=function(e){var r=document.querySelector("#".concat(e,"[data-modal]"));r instanceof HTMLElement&&(r.matches(":popover-open")?r.hidePopover():r.showPopover())};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CommonAndHTMLProps } from "../Element/constants";
|
|
3
|
+
export type ModalElementType = HTMLDivElement;
|
|
4
|
+
export interface ModalCustomProps {
|
|
5
|
+
id: string;
|
|
6
|
+
isDismissible?: boolean;
|
|
7
|
+
showBackdrop?: boolean;
|
|
8
|
+
blurBackdrop?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type ModalProps = Omit<CommonAndHTMLProps<ModalElementType>, keyof ModalCustomProps> & ModalCustomProps;
|
|
11
|
+
export declare const Modal: React.ForwardRefExoticComponent<Omit<CommonAndHTMLProps<HTMLDivElement>, keyof ModalCustomProps> & ModalCustomProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export declare const showModal: (modalId: string) => void;
|
|
13
|
+
export declare const hideModal: (modalId: string) => void;
|
|
14
|
+
export declare const toggleModal: (modalId: string) => void;
|