@teambit/env 1.0.408 → 1.0.409
Sign up to get free protection for your applications and to get access to all the features.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/env-template/public/{824.4eae859d3911b312701c.js → 114.3702c4076a6a1202fe61.js} +2 -2
- package/artifacts/env-template/public/{182.0c7e37d923f441b73245.js → 182.dd1a9991ffff67cad5d7.js} +3 -3
- package/artifacts/env-template/public/assets-manifest.json +12 -12
- package/artifacts/env-template/public/compositions.a35ab3a7ee2cafd7c44c.js +1 -0
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.445b7d88806e351cd6b8.js → overview.bd61a133349db653a8bc.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{peers.1a34e046859c76fe984a.js → peers.8bdb776db96d569e0de6.js} +1 -1
- package/artifacts/env-template/public/{preview-root.9927b89d2114489a6127.js → preview-root.4e40495f3e7b57c722ea.js} +1 -1
- package/artifacts/preview/teambit_envs_env-preview.js +1 -1
- package/artifacts/schema.json +1 -1
- package/dist/{preview-1726543267663.js → preview-1726584693847.js} +2 -2
- package/package.json +7 -7
- package/artifacts/env-template/public/compositions.0b3132dc0df546b7a3d8.js +0 -1
- /package/{compositions-1726543267663.js → compositions-1726584693847.js} +0 -0
- /package/{overview-1726543267663.js → overview-1726584693847.js} +0 -0
package/artifacts/env-template/public/{182.0c7e37d923f441b73245.js → 182.dd1a9991ffff67cad5d7.js}
RENAMED
@@ -384,7 +384,7 @@ the following are permitted ${Object.keys(exports.IssuesClasses).join(", ")}`);c
|
|
384
384
|
}
|
385
385
|
}
|
386
386
|
}
|
387
|
-
`;function useComponentHost(){const{data,loading}=(0,_uiFoundationUiHooks().useDataQuery)(COMPONENT_HOST);return!data||loading?{}:{host:_componentHostModel().ComponentHostModel.from(data)}}},68211:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"AspectData",{enumerable:!0,get:function(){return _aspectEntry().AspectData}}),Object.defineProperty(exports,"AspectEntry",{enumerable:!0,get:function(){return _aspectEntry().AspectEntry}}),Object.defineProperty(exports,"CollapsibleMenuNav",{enumerable:!0,get:function(){return _menu().CollapsibleMenuNav}}),Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return _component2().Component}}),Object.defineProperty(exports,"ComponentAspect",{enumerable:!0,get:function(){return _component().ComponentAspect}}),Object.defineProperty(exports,"ComponentContext",{enumerable:!0,get:function(){return _componentContext().ComponentContext}}),Object.defineProperty(exports,"ComponentDescriptorContext",{enumerable:!0,get:function(){return _componentContext().ComponentDescriptorContext}}),Object.defineProperty(exports,"ComponentDescriptorProvider",{enumerable:!0,get:function(){return _context().ComponentDescriptorProvider}}),Object.defineProperty(exports,"ComponentFS",{enumerable:!0,get:function(){return _componentFs().default}}),Object.defineProperty(exports,"ComponentID",{enumerable:!0,get:function(){return _componentId().ComponentID}}),Object.defineProperty(exports,"ComponentLogsResult",{enumerable:!0,get:function(){return _ui().ComponentLogsResult}}),Object.defineProperty(exports,"ComponentMap",{enumerable:!0,get:function(){return _componentMap().ComponentMap}}),Object.defineProperty(exports,"ComponentMenu",{enumerable:!0,get:function(){return _menu().ComponentMenu}}),Object.defineProperty(exports,"ComponentModel",{enumerable:!0,get:function(){return _componentModel().ComponentModel}}),Object.defineProperty(exports,"ComponentProvider",{enumerable:!0,get:function(){return _context().ComponentProvider}}),Object.defineProperty(exports,"Config",{enumerable:!0,get:function(){return _config().Config}}),Object.defineProperty(exports,"Filters",{enumerable:!0,get:function(){return _ui().Filters}}),Object.defineProperty(exports,"InvalidComponent",{enumerable:!0,get:function(){return _component2().InvalidComponent}}),Object.defineProperty(exports,"ResolveComponentIdFunc",{enumerable:!0,get:function(){return _aspectEntry().ResolveComponentIdFunc}}),Object.defineProperty(exports,"Snap",{enumerable:!0,get:function(){return _snap().Snap}}),Object.defineProperty(exports,"SnapProps",{enumerable:!0,get:function(){return _snap().SnapProps}}),Object.defineProperty(exports,"State",{enumerable:!0,get:function(){return _state().State}}),Object.defineProperty(exports,"Tag",{enumerable:!0,get:function(){return _tag().Tag}}),Object.defineProperty(exports,"TagMap",{enumerable:!0,get:function(){return _tagMap().TagMap}}),Object.defineProperty(exports,"TagProps",{enumerable:!0,get:function(){return _tag().TagProps}}),Object.defineProperty(exports,"TopBarNav",{enumerable:!0,get:function(){return _topBarNav().TopBarNav}}),Object.defineProperty(exports,"VersionRelatedDropdowns",{enumerable:!0,get:function(){return _menu().VersionRelatedDropdowns}}),Object.defineProperty(exports,"componentFields",{enumerable:!0,get:function(){return _ui().componentFields}}),Object.defineProperty(exports,"componentIdFields",{enumerable:!0,get:function(){return _ui().componentIdFields}}),Object.defineProperty(exports,"componentOverviewFields",{enumerable:!0,get:function(){return _ui().componentOverviewFields}}),exports.default=void 0,Object.defineProperty(exports,"useComponent",{enumerable:!0,get:function(){return _ui().useComponent}}),Object.defineProperty(exports,"useComponentDescriptor",{enumerable:!0,get:function(){return _componentContext().useComponentDescriptor}}),Object.defineProperty(exports,"useComponentHost",{enumerable:!0,get:function(){return _host().useComponentHost}}),Object.defineProperty(exports,"useComponentLogs",{enumerable:!0,get:function(){return _ui().useComponentLogs}}),Object.defineProperty(exports,"useIdFromLocation",{enumerable:!0,get:function(){return _ui().useIdFromLocation}});function _component(){const data=__webpack_require__(42259);return _component=function(){return data},data}function _host(){const data=__webpack_require__(2195);return _host=function(){return data},data}function _component2(){const data=__webpack_require__(60195);return _component2=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _componentFs(){const data=_interopRequireDefault(__webpack_require__(11846));return _componentFs=function(){return data},data}function _aspectEntry(){const data=__webpack_require__(69301);return _aspectEntry=function(){return data},data}function _snap(){const data=__webpack_require__(8801);return _snap=function(){return data},data}function _tag(){const data=__webpack_require__(13801);return _tag=function(){return data},data}function _state(){const data=__webpack_require__(49784);return _state=function(){return data},data}function _tagMap(){const data=__webpack_require__(50310);return _tagMap=function(){return data},data}function _componentMap(){const data=__webpack_require__(12178);return _componentMap=function(){return data},data}function _componentContext(){const data=__webpack_require__(48841);return _componentContext=function(){return data},data}function _context(){const data=__webpack_require__(58431);return _context=function(){return data},data}function _ui(){const data=__webpack_require__(4744);return _ui=function(){return data},data}function _menu(){const data=__webpack_require__(70820);return _menu=function(){return data},data}function _componentModel(){const data=__webpack_require__(77237);return _componentModel=function(){return data},data}function _topBarNav(){const data=__webpack_require__(82224);return _topBarNav=function(){return data},data}function _config(){const data=__webpack_require__(5075);return _config=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=_component().ComponentAspect},8801:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Snap=void 0;class Snap{constructor(hash,timestamp,parents,author,message){this.hash=hash,this.timestamp=timestamp,this.parents=parents,this.author=author,this.message=message}static fromObject(snapObject){const parents=snapObject.parents||[];return new Snap(snapObject.hash,new Date(parseInt(snapObject.timestamp)),parents,snapObject.author,snapObject.message)}toObject(){return{timestamp:this.timestamp.getTime().toString(),hash:this.hash,author:this.author,message:this.message,parents:this.parents}}}exports.Snap=Snap},49784:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.State=void 0;function _componentIssues(){const data=__webpack_require__(86853);return _componentIssues=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _exceptions(){const data=__webpack_require__(54428);return _exceptions=function(){return data},data}class State{constructor(config,_aspects,filesystem,dependencies,_consumer){this.config=config,this._aspects=_aspects,this.filesystem=filesystem,this.dependencies=dependencies,this._consumer=_consumer}get mainFile(){const file=this.filesystem.files.find(componentFile=>componentFile.relative===this._consumer.mainFile);if(!file)throw new(_exceptions()).MainFileNotFound(_componentId().ComponentID.fromLegacy(this._consumer.id),this._consumer.mainFile);return file}get hash(){return""}get issues(){return this._consumer.issues||=new(_componentIssues()).IssuesList}get isModified(){return this._consumer._isModified}get aspects(){return this._aspects}set aspects(aspects){this._aspects=aspects}}exports.State=State},50310:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TagMap=void 0;function _pkgModules(){const data=__webpack_require__(27580);return _pkgModules=function(){return data},data}function _semver(){const data=__webpack_require__(9131);return _semver=function(){return data},data}function _exceptions(){const data=__webpack_require__(54428);return _exceptions=function(){return data},data}class TagMap extends Map{byHash(hash){return Array.from(this.values()).find(currTag=>currTag.hash===hash)}getPreReleaseLatestTags(){const preReleaseTagsWithAllVersions=this.toArray().reduce((acc,current)=>{const preReleases=current.version.prerelease;return!preReleases.length||preReleases.length!==2||typeof preReleases[0]!="string"||(acc[preReleases[0]]||=[]).push(current.version.raw),acc},{});return Object.keys(preReleaseTagsWithAllVersions).reduce((acc,current)=>(acc[current]=(0,_semver().maxSatisfying)(preReleaseTagsWithAllVersions[current],"*",{includePrerelease:!0}),acc),{})}getHashMap(){const res=new Map;return this.forEach(tag=>{res.set(tag.hash,tag)}),res}getLatest(){const versions=this.toArray().map(tag=>tag.version.raw);if(this.isEmpty())throw new(_exceptions()).CouldNotFindLatest(versions);return(0,_pkgModules().getLatestVersion)(versions)}isEmpty(){return this.size===0}toArray(){return Array.from(this.values())}byVersion(version){return this.toArray().map(tag=>tag).find(tag=>tag.version.raw===version)}static fromArray(tags){const tuples=tags.map(tag=>[tag.version,tag]);return new TagMap(tuples)}static empty(){return new TagMap}}exports.TagMap=TagMap},47769:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Tag",{enumerable:!0,get:function(){return _tag().Tag}});function _tag(){const data=__webpack_require__(13801);return _tag=function(){return data},data}},13801:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tag=void 0;function _semver(){const data=__webpack_require__(9131);return _semver=function(){return data},data}class Tag{constructor(hash,version){this.hash=hash,this.version=version}toObject(){return{hash:this.hash,version:this.version.raw}}static fromObject(tag){return new Tag(tag.hash,new(_semver()).SemVer(tag.version))}}exports.Tag=Tag},6315:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentError=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__(59496));return _react=function(){return data},data}function _designUiPages(){const data=__webpack_require__(96352);return _designUiPages=function(){return data},data}function _designUiPages2(){const data=__webpack_require__(83698);return _designUiPages2=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class ComponentError{constructor(code,message){this.code=code,this.message=message}renderError(){return this.code===404?_react().default.createElement(_designUiPages().NotFoundPage,null):_react().default.createElement(_designUiPages2().ServerErrorPage,null)}}exports.ComponentError=ComponentError},70145:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentError",{enumerable:!0,get:function(){return _componentError().ComponentError}});function _componentError(){const data=__webpack_require__(6315);return _componentError=function(){return data},data}},46265:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentModel=void 0;function _compositions(){const data=__webpack_require__(32552);return _compositions=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _tag(){const data=__webpack_require__(47769);return _tag=function(){return data},data}function _tagMap(){const data=__webpack_require__(50310);return _tagMap=function(){return data},data}class ComponentModel{constructor(id,displayName,packageName,server,compositions,tags,buildStatus,issuesCount,status,deprecation,environment,description="",labels=[],host,size,latest,preview,logs){this.id=id,this.displayName=displayName,this.packageName=packageName,this.server=server,this.compositions=compositions,this.tags=tags,this.buildStatus=buildStatus,this.issuesCount=issuesCount,this.status=status,this.deprecation=deprecation,this.environment=environment,this.description=description,this.labels=labels,this.host=host,this.size=size,this.latest=latest,this.preview=preview,this.logs=logs}get version(){return this.id.version?this.id.version:"new"}static from({id,server,displayName,compositions=[],packageName,tags=[],deprecation,buildStatus,env,status,issuesCount,description,labels,host,latest,preview,size,logs}){return new ComponentModel(_componentId().ComponentID.fromObject(id),displayName,packageName,server,_compositions().Composition.fromArray(compositions),_tagMap().TagMap.fromArray(tags.map(tag=>_tag().Tag.fromObject(tag))),buildStatus,issuesCount,status,deprecation,env,description,labels,host,size,latest,preview,logs?.map(log=>log??{hash:"[error]",tag:"[error]",message:"",parents:[]}))}static fromArray(componentsProps){return componentsProps.map(rawComponent=>ComponentModel.from(rawComponent))}static empty(){return new ComponentModel(_componentId().ComponentID.fromObject({name:"root",scope:"temp"}),"","",{env:"",url:""},[],_tagMap().TagMap.empty())}}exports.ComponentModel=ComponentModel},77237:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentModel",{enumerable:!0,get:function(){return _componentModel().ComponentModel}}),Object.defineProperty(exports,"ComponentModelProps",{enumerable:!0,get:function(){return _componentModel().ComponentModelProps}});function _componentModel(){const data=__webpack_require__(46265);return _componentModel=function(){return data},data}},34146:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Component=Component;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _lodash(){const data=_interopRequireDefault(__webpack_require__(11549));return _lodash=function(){return data},data}function _uiFoundationUiReactRouter(){const data=__webpack_require__(24681);return _uiFoundationUiReactRouter=function(){return data},data}function _lodash2(){const data=__webpack_require__(32699);return _lodash2=function(){return data},data}function _context(){const data=__webpack_require__(58431);return _context=function(){return data},data}function _useComponent(){const data=__webpack_require__(21268);return _useComponent=function(){return data},data}function _useComponentFromLocation(){const data=__webpack_require__(39646);return _useComponentFromLocation=function(){return data},data}function _(){const data=__webpack_require__(68211);return _=function(){return data},data}function _componentModule(){const data=_interopRequireDefault(__webpack_require__(42058));return _componentModule=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return typeof i=="symbol"?i:i+""}function _toPrimitive(t,r){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function getComponentIdStr(componentIdStr){return(0,_lodash2().isFunction)(componentIdStr)?componentIdStr():componentIdStr}function Component({routeSlot,overriddenRoutes,containerSlot,host,onComponentChange,componentIdStr,useComponent,path,useComponentFilters}){const idFromLocation=(0,_useComponentFromLocation().useIdFromLocation)(),componentIdStrWithScopeFromLocation=(0,_useComponentFromLocation().useIdFromLocation)(void 0,!0),_componentIdStr=getComponentIdStr(componentIdStr),componentId=_componentIdStr?_().ComponentID.fromString(_componentIdStr):void 0,resolvedComponentIdStr=path||idFromLocation,componentFiltersFromProps=useComponentFilters?.()||{},useComponentOptions={logFilters:_objectSpread(_objectSpread({},componentFiltersFromProps),componentFiltersFromProps.loading?{}:{log:_objectSpread({},componentFiltersFromProps.log)}),customUseComponent:useComponent},{component,componentDescriptor,error}=(0,_useComponent().useComponent)(host,componentId?.toString()||componentIdStrWithScopeFromLocation,useComponentOptions);(0,_react().useEffect)(()=>onComponentChange?.(component),[component]),(0,_react().useEffect)(()=>()=>onComponentChange?.(void 0),[]);const pageItems=(0,_react().useMemo)(()=>(0,_lodash().default)(containerSlot?.values()),[containerSlot]),before=(0,_react().useMemo)(()=>pageItems.filter(x=>x.type==="before").map(x=>x.content),[pageItems]),after=(0,_react().useMemo)(()=>pageItems.filter(x=>x.type==="after").map(x=>x.content),[pageItems]);return error?error?.renderError():component?_react().default.createElement(_context().ComponentDescriptorProvider,{componentDescriptor},_react().default.createElement(_context().ComponentProvider,{component},before,_react().default.createElement("div",{className:_componentModule().default.container},routeSlot&&_react().default.createElement(_uiFoundationUiReactRouter().SlotRouter,{parentPath:`${resolvedComponentIdStr}/*`,slot:routeSlot,routes:overriddenRoutes})),after)):_react().default.createElement("div",null)}},48841:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useComponentDescriptor=exports.ComponentDescriptorContext=exports.ComponentContext=void 0;function _react(){const data=__webpack_require__(59496);return _react=function(){return data},data}function _componentModel(){const data=__webpack_require__(77237);return _componentModel=function(){return data},data}const ComponentContext=exports.ComponentContext=(0,_react().createContext)(_componentModel().ComponentModel.empty()),ComponentDescriptorContext=exports.ComponentDescriptorContext=(0,_react().createContext)(void 0),useComponentDescriptor=()=>(0,_react().useContext)(ComponentDescriptorContext);exports.useComponentDescriptor=useComponentDescriptor},9994:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentDescriptorProvider=ComponentDescriptorProvider,exports.ComponentProvider=ComponentProvider;function _react(){const data=_interopRequireDefault(__webpack_require__(59496));return _react=function(){return data},data}function _componentContext(){const data=__webpack_require__(48841);return _componentContext=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ComponentProvider({component,children}){return _react().default.createElement(_componentContext().ComponentContext.Provider,{value:component},children)}function ComponentDescriptorProvider({componentDescriptor,children}){return _react().default.createElement(_componentContext().ComponentDescriptorContext.Provider,{value:componentDescriptor},children)}},58431:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentContext",{enumerable:!0,get:function(){return _componentContext().ComponentContext}}),Object.defineProperty(exports,"ComponentDescriptorContext",{enumerable:!0,get:function(){return _componentContext().ComponentDescriptorContext}}),Object.defineProperty(exports,"ComponentDescriptorProvider",{enumerable:!0,get:function(){return _componentProvider().ComponentDescriptorProvider}}),Object.defineProperty(exports,"ComponentProvider",{enumerable:!0,get:function(){return _componentProvider().ComponentProvider}}),Object.defineProperty(exports,"useComponentDescriptor",{enumerable:!0,get:function(){return _componentContext().useComponentDescriptor}});function _componentContext(){const data=__webpack_require__(48841);return _componentContext=function(){return data},data}function _componentProvider(){const data=__webpack_require__(9994);return _componentProvider=function(){return data},data}},4744:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"COMPONENT_QUERY_LOG_FIELDS",{enumerable:!0,get:function(){return _useComponent2().COMPONENT_QUERY_LOG_FIELDS}}),Object.defineProperty(exports,"CollapsibleMenuNav",{enumerable:!0,get:function(){return _menu().CollapsibleMenuNav}}),Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return _component().Component}}),Object.defineProperty(exports,"ComponentContext",{enumerable:!0,get:function(){return _context().ComponentContext}}),Object.defineProperty(exports,"ComponentMenu",{enumerable:!0,get:function(){return _menu().ComponentMenu}}),Object.defineProperty(exports,"ComponentModel",{enumerable:!0,get:function(){return _componentModel().ComponentModel}}),Object.defineProperty(exports,"ComponentModelProps",{enumerable:!0,get:function(){return _componentModel().ComponentModelProps}}),Object.defineProperty(exports,"ComponentProvider",{enumerable:!0,get:function(){return _context().ComponentProvider}}),Object.defineProperty(exports,"ConsumeMethodSlot",{enumerable:!0,get:function(){return _menu().ConsumeMethodSlot}}),Object.defineProperty(exports,"GET_COMPONENT",{enumerable:!0,get:function(){return _useComponent2().GET_COMPONENT}}),Object.defineProperty(exports,"GET_COMPONENT_WITH_LOGS",{enumerable:!0,get:function(){return _useComponent2().GET_COMPONENT_WITH_LOGS}}),Object.defineProperty(exports,"MenuNavProps",{enumerable:!0,get:function(){return _menu().MenuNavProps}}),Object.defineProperty(exports,"TopBarNav",{enumerable:!0,get:function(){return _topBarNav().TopBarNav}}),Object.defineProperty(exports,"VersionRelatedDropdowns",{enumerable:!0,get:function(){return _menu().VersionRelatedDropdowns}}),Object.defineProperty(exports,"componentFields",{enumerable:!0,get:function(){return _useComponent2().componentFields}}),Object.defineProperty(exports,"componentFieldsWithLogs",{enumerable:!0,get:function(){return _useComponent2().componentFieldsWithLogs}}),Object.defineProperty(exports,"componentIdFields",{enumerable:!0,get:function(){return _useComponent2().componentIdFields}}),Object.defineProperty(exports,"componentOverviewFields",{enumerable:!0,get:function(){return _useComponent2().componentOverviewFields}}),Object.defineProperty(exports,"useComponent",{enumerable:!0,get:function(){return _useComponent().useComponent}}),Object.defineProperty(exports,"useComponentLogs",{enumerable:!0,get:function(){return _useComponentLogs().useComponentLogs}}),Object.defineProperty(exports,"useComponentQuery",{enumerable:!0,get:function(){return _useComponentQuery().useComponentQuery}}),Object.defineProperty(exports,"useIdFromLocation",{enumerable:!0,get:function(){return _useComponentFromLocation().useIdFromLocation}});function _menu(){const data=__webpack_require__(70820);return _menu=function(){return data},data}function _component(){const data=__webpack_require__(34146);return _component=function(){return data},data}function _componentModel(){const data=__webpack_require__(77237);return _componentModel=function(){return data},data}function _context(){const data=__webpack_require__(58431);return _context=function(){return data},data}function _topBarNav(){const data=__webpack_require__(82224);return _topBarNav=function(){return data},data}function _useComponent(){const data=__webpack_require__(21268);return _useComponent=function(){return data},data}function _useComponent2(){const data=__webpack_require__(86851);return _useComponent2=function(){return data},data}function _useComponentFromLocation(){const data=__webpack_require__(39646);return _useComponentFromLocation=function(){return data},data}function _useComponentQuery(){const data=__webpack_require__(62589);return _useComponentQuery=function(){return data},data}function _useComponentLogs(){const data=__webpack_require__(11129);return _useComponentLogs=function(){return data},data}},70820:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"CollapsibleMenuNav",{enumerable:!0,get:function(){return _menuNav().CollapsibleMenuNav}}),Object.defineProperty(exports,"ComponentMenu",{enumerable:!0,get:function(){return _menu().ComponentMenu}}),Object.defineProperty(exports,"MenuNavProps",{enumerable:!0,get:function(){return _menuNav().MenuNavProps}}),Object.defineProperty(exports,"RightSideMenuItem",{enumerable:!0,get:function(){return _menu().RightSideMenuItem}}),Object.defineProperty(exports,"RightSideMenuSlot",{enumerable:!0,get:function(){return _menu().RightSideMenuSlot}}),Object.defineProperty(exports,"VersionRelatedDropdowns",{enumerable:!0,get:function(){return _menu().VersionRelatedDropdowns}});function _menuNav(){const data=__webpack_require__(58072);return _menuNav=function(){return data},data}function _menu(){const data=__webpack_require__(23813);return _menu=function(){return data},data}},58072:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CollapsibleMenuNav=CollapsibleMenuNav;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _designNavigation(){const data=__webpack_require__(76055);return _designNavigation=function(){return data},data}function _topBarNav(){const data=__webpack_require__(82224);return _topBarNav=function(){return data},data}function _menuModule(){const data=_interopRequireDefault(__webpack_require__(82769));return _menuModule=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return typeof i=="symbol"?i:i+""}function _toPrimitive(t,r){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function TopBarNavComponent({isInMenu,menuItemProps}){const widgetDisplayText=menuItemProps?.displayName&&isInMenu?menuItemProps?.displayName:void 0;return _react().default.createElement(_topBarNav().TopBarNav,_extends({},menuItemProps,{className:(0,_classnames().default)(menuItemProps?.className,_menuModule().default.topBarNav,isInMenu&&_menuModule().default.noBorder)}),widgetDisplayText||menuItemProps?.children)}function CollapsibleMenuNav({navigationSlot,widgetSlot,navPlugins=[],widgetPlugins=[],className,secondaryNavClassName,activeTabIndex,alwaysShowActiveTab,children}){const plugins=(0,_react().useMemo)(()=>((navPlugins.length>0?navPlugins:navigationSlot?.toArray())||[]).sort(sortFn),[navigationSlot,navPlugins]),widgets=(0,_react().useMemo)(()=>((widgetPlugins.length>0?widgetPlugins:widgetSlot?.toArray())||[]).sort(sortFn),[widgetSlot,widgetPlugins]),links=[...plugins,...widgets].map(([,menuItem],index)=>{const lastPluginStyle=plugins.length-1===index?{marginRight:"auto"}:{},firstWidgetStyle=plugins.length===index?{marginLeft:"auto"}:{};return{component:TopBarNavComponent,tabProps:{menuItemProps:menuItem.props},style:_objectSpread(_objectSpread({},firstWidgetStyle),lastPluginStyle),className:menuItem.props.className}});return _react().default.createElement(_designNavigation().ResponsiveNavbar,{navClassName:(0,_classnames().default)(_menuModule().default.tab,className),secondaryNavClassName,style:{width:"100%",height:"100%"},priority:"none",tabs:links,defaultActiveIndex:activeTabIndex,alwaysShowActiveTab},children)}function sortFn([,{order:first}],[,{order:second}]){return(first??0)-(second??0)}},23813:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentMenu=ComponentMenu,exports.VersionRelatedDropdowns=VersionRelatedDropdowns,exports.defaultLoadCurrentVersion=void 0,exports.defaultLoadVersions=defaultLoadVersions;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _lodash(){const data=__webpack_require__(32699);return _lodash=function(){return data},data}function semver(){const data=_interopRequireWildcard(__webpack_require__(9131));return semver=function(){return data},data}function _componentUi(){const data=__webpack_require__(24636);return _componentUi=function(){return data},data}function _uiFoundationUi(){const data=__webpack_require__(69952);return _uiFoundationUi=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _baseReactNavigation(){const data=__webpack_require__(98560);return _baseReactNavigation=function(){return data},data}function _uiFoundationUiUseBox(){const data=__webpack_require__(53179);return _uiFoundationUiUseBox=function(){return data},data}function _lanesHooks(){const data=__webpack_require__(33461);return _lanesHooks=function(){return data},data}function _uiFoundationUiUseBox2(){const data=__webpack_require__(51114);return _uiFoundationUiUseBox2=function(){return data},data}function _useComponent(){const data=__webpack_require__(21268);return _useComponent=function(){return data},data}function _menuNav(){const data=__webpack_require__(58072);return _menuNav=function(){return data},data}function _useComponentFromLocation(){const data=__webpack_require__(39646);return _useComponentFromLocation=function(){return data},data}function _menuModule(){const data=_interopRequireDefault(__webpack_require__(82769));return _menuModule=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return typeof i=="symbol"?i:i+""}function _toPrimitive(t,r){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function getComponentIdStr(componentIdStr){return(0,_lodash().isFunction)(componentIdStr)?componentIdStr():componentIdStr}function ComponentMenu({navigationSlot,widgetSlot,className,host,menuItemSlot,consumeMethodSlot,rightSideMenuSlot,componentIdStr,skipRightSide,RightNode,useComponent,path,useComponentFilters}){const idFromLocation=(0,_useComponentFromLocation().useIdFromLocation)(),componentIdStrWithScopeFromLocation=(0,_useComponentFromLocation().useIdFromLocation)(void 0,!0),_componentIdStr=getComponentIdStr(componentIdStr),componentId=_componentIdStr?_componentId().ComponentID.fromString(_componentIdStr):void 0,resolvedComponentIdStr=path||idFromLocation,mainMenuItems=(0,_react().useMemo)(()=>(0,_lodash().groupBy)((0,_lodash().flatten)(menuItemSlot.values()),"category"),[menuItemSlot]),rightSideItems=(0,_react().useMemo)(()=>(0,_lodash().orderBy)((0,_lodash().flatten)(rightSideMenuSlot.values()),"order"),[rightSideMenuSlot]),componentFilters=useComponentFilters?.()||{},useComponentVersions=defaultLoadVersions(host,componentId?.toString()||componentIdStrWithScopeFromLocation,componentFilters,useComponent),RightSide=_react().default.createElement("div",{className:_menuModule().default.rightSide},RightNode||_react().default.createElement(_react().default.Fragment,null,_react().default.createElement(VersionRelatedDropdowns,{host,consumeMethods:consumeMethodSlot,componentId:componentId?.toString()||idFromLocation,useComponent:useComponentVersions,componentFilters}),rightSideItems.map(({item})=>item),_react().default.createElement(_uiFoundationUi().MainDropdown,{className:_menuModule().default.hideOnMobile,menuItems:mainMenuItems})));return _react().default.createElement(_reactRouterDom().Routes,null,_react().default.createElement(_reactRouterDom().Route,{path:`${resolvedComponentIdStr}/*`,element:_react().default.createElement("div",{className:(0,_classnames().default)(_menuModule().default.topBar,className)},_react().default.createElement("div",{className:_menuModule().default.leftSide},_react().default.createElement(_menuNav().CollapsibleMenuNav,{navigationSlot,widgetSlot})),!skipRightSide&&_react().default.createElement("div",{className:_menuModule().default.rightSide},RightSide))}))}function defaultLoadVersions(host,componentId,componentFilters={},useComponent,loadingFromProps){return _react().default.useCallback(_props=>{const{skip,initialLoad}=_props||{},fetchOptions={logFilters:_objectSpread(_objectSpread({},componentFilters),{},{log:_objectSpread(_objectSpread({},componentFilters.log),{},{limit:initialLoad?3:void 0})}),skip:loadingFromProps||skip,customUseComponent:useComponent},{component,loading:loadingComponent,componentLogs={}}=(0,_useComponent().useComponent)(host,componentId,fetchOptions),logs=componentLogs?.logs,loading=_react().default.useMemo(()=>loadingComponent||loadingFromProps||componentLogs.loading,[loadingComponent,loadingFromProps,componentLogs.loading]),snaps=(0,_react().useMemo)(()=>(logs||[]).filter(log=>!log.tag).map(snap=>_objectSpread(_objectSpread({},snap),{},{version:snap.hash})),[logs]),tags=(0,_react().useMemo)(()=>{const tagLookup=new Map;return(logs||[]).filter(log=>log.tag).forEach(tag=>{tagLookup.set(tag?.tag,tag)}),(0,_lodash().compact)((component?.tags?.toArray()||[]).reverse().map(tag=>tagLookup.get(tag.version.version))).map(tag=>_objectSpread(_objectSpread({},tag),{},{version:tag.tag}))},[logs]);return{loading,id:component?.id,packageName:component?.packageName,latestVersion:component?.latest,currentVersion:component?.version,snaps,tags,buildStatus:component?.buildStatus}},[componentId,loadingFromProps,componentFilters])}const defaultLoadCurrentVersion=props=>_props=>{const{skip,version:_version}=_props||{},{snaps,tags,currentVersion,loading}=props.useComponent?.({skip,id:props.componentId})??{},version=_version??currentVersion;return _react().default.useMemo(()=>semver().valid(version),[loading,version])?_react().default.useMemo(()=>tags?.find(tag=>tag.tag===version),[loading,tags?.length,version]):_react().default.useMemo(()=>snaps?.find(snap=>snap.version===version),[loading,snaps?.length,version])};exports.defaultLoadCurrentVersion=defaultLoadCurrentVersion;function VersionRelatedDropdowns(props){const updatedPropsWithDefaults=_objectSpread(_objectSpread({},props),{},{useLanes:props.useLanes??_lanesHooks().useLanes,dropdownOptions:_objectSpread(_objectSpread({},props.dropdownOptions),{},{showVersionDetails:props?.dropdownOptions?.showVersionDetails??!0})}),loadVersion=defaultLoadCurrentVersion(updatedPropsWithDefaults),{useLanes,consumeMethods,className,dropdownOptions,host}=updatedPropsWithDefaults,{loading,id,tags,snaps,latest,packageName,currentVersion:_currentVersion}=props.useComponent?.({initialLoad:!0})||{},location=(0,_baseReactNavigation().useLocation)(),{lanesModel}=useLanes(),lanes=id?lanesModel?.getLanesByComponentId(id)?.filter(lane=>!lane.id.isDefault())||[]:[],viewedLane=lanesModel?.viewedLane?.id&&!lanesModel?.viewedLane?.id.isDefault()?lanesModel.viewedLane:void 0,isWorkspace=host==="teambit.workspace/workspace",isNew=tags?.length===0&&snaps?.length===0,localVersion=isWorkspace&&!isNew&&(!viewedLane||lanesModel?.isViewingCurrentLane()),currentVersion=isWorkspace&&!isNew&&!location?.search.includes("version")?"workspace":_currentVersion??"",consumeMethodProps=_react().default.useMemo(()=>id?{id,packageName:packageName??"",latest,options:{viewedLane,disableInstall:!packageName}}:void 0,[id,packageName,latest,viewedLane]),methods=useConsumeMethods(consumeMethods,consumeMethodProps),hasMethods=methods?.length>0;return _react().default.createElement(_react().default.Fragment,null,consumeMethods&&id&&hasMethods&&_react().default.createElement(_uiFoundationUiUseBox().UseBoxDropdown,{position:"bottom-end",className:(0,_classnames().default)(_menuModule().default.useBox,_menuModule().default.hideOnMobile),Menu:_react().default.createElement(_uiFoundationUiUseBox2().Menu,{methods,componentName:id.name})}),_react().default.createElement(_componentUi().VersionDropdown,{lanes,loading,useComponentVersions:props.useComponent,hasMoreVersions:!isNew,useCurrentVersionLog:loadVersion,localVersion,currentVersion,latestVersion:latest,currentLane:viewedLane,className,menuClassName:_menuModule().default.componentVersionMenu,getActiveTabIndex:dropdownOptions?.getActiveTabIndex,showVersionDetails:dropdownOptions?.showVersionDetails}))}function useConsumeMethods(consumeMethods,consumePluginProps){return(0,_react().useMemo)(()=>(0,_lodash().flatten)(consumeMethods?.values()).map(method=>{if(!!consumePluginProps)return method?.(consumePluginProps)}).filter(x=>!!x&&x.Component&&x.Title),[consumeMethods,consumePluginProps])}},82224:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _topBarNav=__webpack_require__(13264);Object.keys(_topBarNav).forEach(function(key){key==="default"||key==="__esModule"||key in exports&&exports[key]===_topBarNav[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _topBarNav[key]}})})},13264:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TopBarNav=TopBarNav;function _react(){const data=_interopRequireDefault(__webpack_require__(59496));return _react=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}function _baseReactNavigation(){const data=__webpack_require__(98560);return _baseReactNavigation=function(){return data},data}function _topBarNavModule(){const data=_interopRequireDefault(__webpack_require__(37987));return _topBarNavModule=function(){return data},data}const _excluded=["href","className","activeClassName","children","displayName","ignoreQueryParams"];function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}const Link=_baseReactNavigation().Link;function TopBarNav(_ref){let{href,className,activeClassName,children,displayName,ignoreQueryParams}=_ref,rest=_objectWithoutProperties(_ref,_excluded);const{search}=(0,_reactRouterDom().useLocation)(),preventPassingDisplayNameToLink=displayName,target=href&&!ignoreQueryParams&&`${href}${search}`||href;return _react().default.createElement(Link,_extends({},rest,{className:(0,_classnames().default)(className,_topBarNavModule().default.topBarLink),activeClassName:(0,_classnames().default)(activeClassName,_topBarNavModule().default.active),href:target}),_react().default.createElement("div",null,children))}},39646:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useIdFromLocation=useIdFromLocation;function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}const componentRegex=/^[\w/-]*[\w-]/;function useIdFromLocation(url,deriveScopeFromSearchParams){const params=(0,_reactRouterDom().useParams)(),[searchParams]=(0,_reactRouterDom().useSearchParams)(),scopeFromQueryParams=searchParams.get("scope")??void 0,splat=url||params["*"];if(!splat)return;const[maybeOrgWithScope,...maybeFullName]=splat.split("/"),hasScope=maybeOrgWithScope.split(".").length>1,fullNameFromUrl=hasScope?maybeFullName.join("/"):splat;let scope;hasScope&&(scope=maybeOrgWithScope),!hasScope&&deriveScopeFromSearchParams&&(scope=scopeFromQueryParams);const match=componentRegex.exec(fullNameFromUrl);if(!!match?.[0])return scope?`${scope}/${match[0]}`:match[0]}},11129:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useComponentLogs=useComponentLogs,exports.useComponentLogsInit=useComponentLogsInit;function _react(){const data=__webpack_require__(59496);return _react=function(){return data},data}function _uiFoundationUiHooks(){const data=__webpack_require__(48474);return _uiFoundationUiHooks=function(){return data},data}function _useComponent(){const data=__webpack_require__(86851);return _useComponent=function(){return data},data}function _componentError(){const data=__webpack_require__(70145);return _componentError=function(){return data},data}function _useComponent2(){const data=__webpack_require__(12645);return _useComponent2=function(){return data},data}function _(){const data=__webpack_require__(68211);return _=function(){return data},data}function useComponentLogs(componentId,host,filters,skipFromProps){const{variables,skip}=useComponentLogsInit(componentId,host,filters,skipFromProps),{data,error,loading}=(0,_uiFoundationUiHooks().useDataQuery)(_useComponent().GET_COMPONENT_WITH_LOGS,{variables,skip,errorPolicy:"all"}),rawComponent=data?.getHost?.get,rawCompLogs=rawComponent?.logs,componentError=error&&!data?new(_componentError()).ComponentError(500,error.message):!rawComponent&&!loading&&new(_componentError()).ComponentError(404)||void 0,idDepKey=rawComponent?.id?`${rawComponent?.id?.scope}/${rawComponent?.id?.name}@${rawComponent?.id?.version}}`:void 0,id=(0,_react().useMemo)(()=>rawComponent?_().ComponentID.fromObject(rawComponent.id):void 0,[idDepKey]);return{loading,id,packageName:rawComponent?.packageName,latest:rawComponent?.latest,error:componentError,componentLogs:{logs:rawCompLogs,loading}}}function useComponentLogsInit(componentId,host,filters,skip){const{log}=filters||{},{head:logHead,offset:logOffset,sort:logSort,limit:logLimit,type:logType,takeHeadFromComponent:logTakeHeadFromComponent}=log||{},variables={id:componentId,extensionId:host,logOffset:(0,_useComponent2().getOffsetValue)(logOffset,logLimit),logLimit,logType,logHead,logSort,logTakeHeadFromComponent};return{logOffset,variables,skip}}},62589:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useComponentQuery=useComponentQuery;function _react(){const data=__webpack_require__(59496);return _react=function(){return data},data}function _uiFoundationUiHooks(){const data=__webpack_require__(48474);return _uiFoundationUiHooks=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _componentDescriptor(){const data=__webpack_require__(57984);return _componentDescriptor=function(){return data},data}function _componentModel(){const data=__webpack_require__(77237);return _componentModel=function(){return data},data}function _useComponent(){const data=__webpack_require__(86851);return _useComponent=function(){return data},data}function _useComponentLogs(){const data=__webpack_require__(11129);return _useComponentLogs=function(){return data},data}function _componentError(){const data=__webpack_require__(70145);return _componentError=function(){return data},data}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return typeof i=="symbol"?i:i+""}function _toPrimitive(t,r){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function useComponentQuery(componentId,host,filters,skip){const idRef=(0,_react().useRef)(componentId);idRef.current=componentId;const variables={id:componentId,extensionId:host},{data,error,loading,subscribeToMore}=(0,_uiFoundationUiHooks().useDataQuery)(_useComponent().GET_COMPONENT,{variables,skip,errorPolicy:"all"}),{loading:loadingLogs,componentLogs:{logs}={}}=(0,_useComponentLogs().useComponentLogs)(componentId,host,filters,skip),rawComponent=data?.getHost?.get;(0,_react().useEffect)(()=>{if(host!=="teambit.workspace/workspace")return()=>{};const unsubAddition=subscribeToMore({document:_useComponent().SUB_SUBSCRIPTION_ADDED,updateQuery:(prev,{subscriptionData})=>{const prevComponent=prev?.getHost?.get,addedComponent=subscriptionData?.data?.componentAdded?.component;return!addedComponent||prevComponent?prev:idRef.current===addedComponent.id.name?_objectSpread(_objectSpread({},prev),{},{getHost:_objectSpread(_objectSpread({},prev.getHost),{},{get:addedComponent})}):prev}}),unsubChanges=subscribeToMore({document:_useComponent().SUB_COMPONENT_CHANGED,updateQuery:(prev,{subscriptionData})=>{if(!subscriptionData.data)return prev;const prevComponent=prev?.getHost?.get,updatedComponent=subscriptionData?.data?.componentChanged?.component;return updatedComponent&&_componentId().ComponentID.isEqualObj(prevComponent?.id,updatedComponent?.id)?_objectSpread(_objectSpread({},prev),{},{getHost:_objectSpread(_objectSpread({},prev.getHost),{},{get:updatedComponent})}):prev}}),unsubRemoval=subscribeToMore({document:_useComponent().SUB_COMPONENT_REMOVED,updateQuery:(prev,{subscriptionData})=>{if(!subscriptionData.data)return prev;const prevComponent=prev?.getHost?.get,removedIds=subscriptionData?.data?.componentRemoved?.componentIds;return!prevComponent||!removedIds?.length?prev:removedIds.some(removedId=>_componentId().ComponentID.isEqualObj(removedId,prevComponent.id))?_objectSpread(_objectSpread({},prev),{},{getHost:_objectSpread(_objectSpread({},prev.getHost),{},{get:null})}):prev}});return()=>{unsubChanges(),unsubAddition(),unsubRemoval()}},[]);const idDepKey=rawComponent?.id?`${rawComponent?.id?.scope}/${rawComponent?.id?.name}@${rawComponent?.id?.version}}`:void 0,id=(0,_react().useMemo)(()=>rawComponent?_componentId().ComponentID.fromObject(rawComponent.id):void 0,[idDepKey]),componentError=error&&!data?new(_componentError()).ComponentError(500,error.message):!rawComponent&&!loading&&new(_componentError()).ComponentError(404)||void 0,component=(0,_react().useMemo)(()=>rawComponent?_componentModel().ComponentModel.from(_objectSpread(_objectSpread({},rawComponent),{},{host,logs})):void 0,[id?.toString(),logs]),componentDescriptor=(0,_react().useMemo)(()=>{const aspectList={entries:rawComponent?.aspects.map(aspectObject=>_objectSpread(_objectSpread({},aspectObject),{},{aspectId:aspectObject.id,aspectData:aspectObject.data}))};return id?_componentDescriptor().ComponentDescriptor.fromObject({id:id.toString(),aspectList}):void 0},[id?.toString()]);return(0,_react().useMemo)(()=>({componentDescriptor,component,componentLogs:{loading:loadingLogs,logs},error:componentError||void 0,loading}),[host,component,componentDescriptor,componentError])}},86851:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.componentOverviewFields=exports.componentIdFields=exports.componentFieldsWithLogs=exports.componentFields=exports.SUB_SUBSCRIPTION_ADDED=exports.SUB_COMPONENT_REMOVED=exports.SUB_COMPONENT_CHANGED=exports.GET_COMPONENT_WITH_LOGS=exports.GET_COMPONENT=exports.COMPONENT_QUERY_LOG_FIELDS=void 0;function _client(){const data=__webpack_require__(53574);return _client=function(){return data},data}const componentIdFields=exports.componentIdFields=(0,_client().gql)`
|
387
|
+
`;function useComponentHost(){const{data,loading}=(0,_uiFoundationUiHooks().useDataQuery)(COMPONENT_HOST);return!data||loading?{}:{host:_componentHostModel().ComponentHostModel.from(data)}}},68211:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"AspectData",{enumerable:!0,get:function(){return _aspectEntry().AspectData}}),Object.defineProperty(exports,"AspectEntry",{enumerable:!0,get:function(){return _aspectEntry().AspectEntry}}),Object.defineProperty(exports,"CollapsibleMenuNav",{enumerable:!0,get:function(){return _menu().CollapsibleMenuNav}}),Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return _component2().Component}}),Object.defineProperty(exports,"ComponentAspect",{enumerable:!0,get:function(){return _component().ComponentAspect}}),Object.defineProperty(exports,"ComponentContext",{enumerable:!0,get:function(){return _componentContext().ComponentContext}}),Object.defineProperty(exports,"ComponentDescriptorContext",{enumerable:!0,get:function(){return _componentContext().ComponentDescriptorContext}}),Object.defineProperty(exports,"ComponentDescriptorProvider",{enumerable:!0,get:function(){return _context().ComponentDescriptorProvider}}),Object.defineProperty(exports,"ComponentFS",{enumerable:!0,get:function(){return _componentFs().default}}),Object.defineProperty(exports,"ComponentID",{enumerable:!0,get:function(){return _componentId().ComponentID}}),Object.defineProperty(exports,"ComponentLogsResult",{enumerable:!0,get:function(){return _ui().ComponentLogsResult}}),Object.defineProperty(exports,"ComponentMap",{enumerable:!0,get:function(){return _componentMap().ComponentMap}}),Object.defineProperty(exports,"ComponentMenu",{enumerable:!0,get:function(){return _menu().ComponentMenu}}),Object.defineProperty(exports,"ComponentModel",{enumerable:!0,get:function(){return _componentModel().ComponentModel}}),Object.defineProperty(exports,"ComponentProvider",{enumerable:!0,get:function(){return _context().ComponentProvider}}),Object.defineProperty(exports,"Config",{enumerable:!0,get:function(){return _config().Config}}),Object.defineProperty(exports,"Filters",{enumerable:!0,get:function(){return _ui().Filters}}),Object.defineProperty(exports,"InvalidComponent",{enumerable:!0,get:function(){return _component2().InvalidComponent}}),Object.defineProperty(exports,"ResolveComponentIdFunc",{enumerable:!0,get:function(){return _aspectEntry().ResolveComponentIdFunc}}),Object.defineProperty(exports,"Snap",{enumerable:!0,get:function(){return _snap().Snap}}),Object.defineProperty(exports,"SnapProps",{enumerable:!0,get:function(){return _snap().SnapProps}}),Object.defineProperty(exports,"State",{enumerable:!0,get:function(){return _state().State}}),Object.defineProperty(exports,"Tag",{enumerable:!0,get:function(){return _tag().Tag}}),Object.defineProperty(exports,"TagMap",{enumerable:!0,get:function(){return _tagMap().TagMap}}),Object.defineProperty(exports,"TagProps",{enumerable:!0,get:function(){return _tag().TagProps}}),Object.defineProperty(exports,"TopBarNav",{enumerable:!0,get:function(){return _topBarNav().TopBarNav}}),Object.defineProperty(exports,"VersionRelatedDropdowns",{enumerable:!0,get:function(){return _menu().VersionRelatedDropdowns}}),Object.defineProperty(exports,"componentFields",{enumerable:!0,get:function(){return _ui().componentFields}}),Object.defineProperty(exports,"componentIdFields",{enumerable:!0,get:function(){return _ui().componentIdFields}}),Object.defineProperty(exports,"componentOverviewFields",{enumerable:!0,get:function(){return _ui().componentOverviewFields}}),exports.default=void 0,Object.defineProperty(exports,"useComponent",{enumerable:!0,get:function(){return _ui().useComponent}}),Object.defineProperty(exports,"useComponentDescriptor",{enumerable:!0,get:function(){return _componentContext().useComponentDescriptor}}),Object.defineProperty(exports,"useComponentHost",{enumerable:!0,get:function(){return _host().useComponentHost}}),Object.defineProperty(exports,"useComponentLogs",{enumerable:!0,get:function(){return _ui().useComponentLogs}}),Object.defineProperty(exports,"useIdFromLocation",{enumerable:!0,get:function(){return _ui().useIdFromLocation}});function _component(){const data=__webpack_require__(42259);return _component=function(){return data},data}function _host(){const data=__webpack_require__(2195);return _host=function(){return data},data}function _component2(){const data=__webpack_require__(60195);return _component2=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _componentFs(){const data=_interopRequireDefault(__webpack_require__(11846));return _componentFs=function(){return data},data}function _aspectEntry(){const data=__webpack_require__(69301);return _aspectEntry=function(){return data},data}function _snap(){const data=__webpack_require__(8801);return _snap=function(){return data},data}function _tag(){const data=__webpack_require__(13801);return _tag=function(){return data},data}function _state(){const data=__webpack_require__(49784);return _state=function(){return data},data}function _tagMap(){const data=__webpack_require__(50310);return _tagMap=function(){return data},data}function _componentMap(){const data=__webpack_require__(12178);return _componentMap=function(){return data},data}function _componentContext(){const data=__webpack_require__(48841);return _componentContext=function(){return data},data}function _context(){const data=__webpack_require__(58431);return _context=function(){return data},data}function _ui(){const data=__webpack_require__(4744);return _ui=function(){return data},data}function _menu(){const data=__webpack_require__(70820);return _menu=function(){return data},data}function _componentModel(){const data=__webpack_require__(77237);return _componentModel=function(){return data},data}function _topBarNav(){const data=__webpack_require__(82224);return _topBarNav=function(){return data},data}function _config(){const data=__webpack_require__(5075);return _config=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=_component().ComponentAspect},8801:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Snap=void 0;class Snap{constructor(hash,timestamp,parents,author,message){this.hash=hash,this.timestamp=timestamp,this.parents=parents,this.author=author,this.message=message}static fromObject(snapObject){const parents=snapObject.parents||[];return new Snap(snapObject.hash,new Date(parseInt(snapObject.timestamp)),parents,snapObject.author,snapObject.message)}toObject(){return{timestamp:this.timestamp.getTime().toString(),hash:this.hash,author:this.author,message:this.message,parents:this.parents}}}exports.Snap=Snap},49784:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.State=void 0;function _componentIssues(){const data=__webpack_require__(86853);return _componentIssues=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _exceptions(){const data=__webpack_require__(54428);return _exceptions=function(){return data},data}class State{constructor(config,_aspects,filesystem,dependencies,_consumer){this.config=config,this._aspects=_aspects,this.filesystem=filesystem,this.dependencies=dependencies,this._consumer=_consumer}get mainFile(){const file=this.filesystem.files.find(componentFile=>componentFile.relative===this._consumer.mainFile);if(!file)throw new(_exceptions()).MainFileNotFound(_componentId().ComponentID.fromLegacy(this._consumer.id),this._consumer.mainFile);return file}get hash(){return""}get issues(){return this._consumer.issues||=new(_componentIssues()).IssuesList}get isModified(){return this._consumer._isModified}get aspects(){return this._aspects}set aspects(aspects){this._aspects=aspects}}exports.State=State},50310:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TagMap=void 0;function _pkgModules(){const data=__webpack_require__(27580);return _pkgModules=function(){return data},data}function _semver(){const data=__webpack_require__(9131);return _semver=function(){return data},data}function _exceptions(){const data=__webpack_require__(54428);return _exceptions=function(){return data},data}class TagMap extends Map{byHash(hash){return Array.from(this.values()).find(currTag=>currTag.hash===hash)}getPreReleaseLatestTags(){const preReleaseTagsWithAllVersions=this.toArray().reduce((acc,current)=>{const preReleases=current.version.prerelease;return!preReleases.length||preReleases.length!==2||typeof preReleases[0]!="string"||(acc[preReleases[0]]||=[]).push(current.version.raw),acc},{});return Object.keys(preReleaseTagsWithAllVersions).reduce((acc,current)=>(acc[current]=(0,_semver().maxSatisfying)(preReleaseTagsWithAllVersions[current],"*",{includePrerelease:!0}),acc),{})}getHashMap(){const res=new Map;return this.forEach(tag=>{res.set(tag.hash,tag)}),res}getLatest(){const versions=this.toArray().map(tag=>tag.version.raw);if(this.isEmpty())throw new(_exceptions()).CouldNotFindLatest(versions);return(0,_pkgModules().getLatestVersion)(versions)}isEmpty(){return this.size===0}toArray(){return Array.from(this.values())}byVersion(version){return this.toArray().map(tag=>tag).find(tag=>tag.version.raw===version)}static fromArray(tags){const tuples=tags.map(tag=>[tag.version,tag]);return new TagMap(tuples)}static empty(){return new TagMap}}exports.TagMap=TagMap},47769:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Tag",{enumerable:!0,get:function(){return _tag().Tag}});function _tag(){const data=__webpack_require__(13801);return _tag=function(){return data},data}},13801:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tag=void 0;function _semver(){const data=__webpack_require__(9131);return _semver=function(){return data},data}class Tag{constructor(hash,version){this.hash=hash,this.version=version}toObject(){return{hash:this.hash,version:this.version.raw}}static fromObject(tag){return new Tag(tag.hash,new(_semver()).SemVer(tag.version))}}exports.Tag=Tag},6315:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentError=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__(59496));return _react=function(){return data},data}function _designUiPages(){const data=__webpack_require__(96352);return _designUiPages=function(){return data},data}function _designUiPages2(){const data=__webpack_require__(83698);return _designUiPages2=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class ComponentError{constructor(code,message){this.code=code,this.message=message}renderError(){return this.code===404?_react().default.createElement(_designUiPages().NotFoundPage,null):_react().default.createElement(_designUiPages2().ServerErrorPage,null)}}exports.ComponentError=ComponentError},70145:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentError",{enumerable:!0,get:function(){return _componentError().ComponentError}});function _componentError(){const data=__webpack_require__(6315);return _componentError=function(){return data},data}},46265:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentModel=void 0;function _compositions(){const data=__webpack_require__(32552);return _compositions=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _tag(){const data=__webpack_require__(47769);return _tag=function(){return data},data}function _tagMap(){const data=__webpack_require__(50310);return _tagMap=function(){return data},data}class ComponentModel{constructor(id,displayName,packageName,server,compositions,tags,buildStatus,issuesCount,status,deprecation,environment,description="",labels=[],host,size,latest,preview,logs){this.id=id,this.displayName=displayName,this.packageName=packageName,this.server=server,this.compositions=compositions,this.tags=tags,this.buildStatus=buildStatus,this.issuesCount=issuesCount,this.status=status,this.deprecation=deprecation,this.environment=environment,this.description=description,this.labels=labels,this.host=host,this.size=size,this.latest=latest,this.preview=preview,this.logs=logs}get version(){return this.id.version?this.id.version:"new"}static from({id,server,displayName,compositions=[],packageName,tags=[],deprecation,buildStatus,env,status,issuesCount,description,labels,host,latest,preview,size,logs}){return new ComponentModel(_componentId().ComponentID.fromObject(id),displayName,packageName,server,_compositions().Composition.fromArray(compositions),_tagMap().TagMap.fromArray(tags.map(tag=>_tag().Tag.fromObject(tag))),buildStatus,issuesCount,status,deprecation,env,description,labels,host,size,latest,preview,logs?.map(log=>log??{hash:"[error]",tag:"[error]",message:"",parents:[]}))}static fromArray(componentsProps){return componentsProps.map(rawComponent=>ComponentModel.from(rawComponent))}static empty(){return new ComponentModel(_componentId().ComponentID.fromObject({name:"root",scope:"temp"}),"","",{env:"",url:""},[],_tagMap().TagMap.empty())}}exports.ComponentModel=ComponentModel},77237:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentModel",{enumerable:!0,get:function(){return _componentModel().ComponentModel}}),Object.defineProperty(exports,"ComponentModelProps",{enumerable:!0,get:function(){return _componentModel().ComponentModelProps}});function _componentModel(){const data=__webpack_require__(46265);return _componentModel=function(){return data},data}},34146:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Component=Component;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _lodash(){const data=_interopRequireDefault(__webpack_require__(11549));return _lodash=function(){return data},data}function _uiFoundationUiReactRouter(){const data=__webpack_require__(24681);return _uiFoundationUiReactRouter=function(){return data},data}function _lodash2(){const data=__webpack_require__(32699);return _lodash2=function(){return data},data}function _context(){const data=__webpack_require__(58431);return _context=function(){return data},data}function _useComponent(){const data=__webpack_require__(21268);return _useComponent=function(){return data},data}function _useComponentFromLocation(){const data=__webpack_require__(39646);return _useComponentFromLocation=function(){return data},data}function _(){const data=__webpack_require__(68211);return _=function(){return data},data}function _componentModule(){const data=_interopRequireDefault(__webpack_require__(42058));return _componentModule=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return typeof i=="symbol"?i:i+""}function _toPrimitive(t,r){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function getComponentIdStr(componentIdStr){return(0,_lodash2().isFunction)(componentIdStr)?componentIdStr():componentIdStr}function Component({routeSlot,overriddenRoutes,containerSlot,host,onComponentChange,componentIdStr,useComponent,path,useComponentFilters}){const idFromLocation=(0,_useComponentFromLocation().useIdFromLocation)(),componentIdStrWithScopeFromLocation=(0,_useComponentFromLocation().useIdFromLocation)(void 0,!0),_componentIdStr=getComponentIdStr(componentIdStr),componentId=_componentIdStr?_().ComponentID.fromString(_componentIdStr):void 0,resolvedComponentIdStr=path||idFromLocation,componentFiltersFromProps=useComponentFilters?.()||{},useComponentOptions={logFilters:_objectSpread(_objectSpread({},componentFiltersFromProps),componentFiltersFromProps.loading?{}:{log:_objectSpread({},componentFiltersFromProps.log)}),customUseComponent:useComponent},{component,componentDescriptor,error}=(0,_useComponent().useComponent)(host,componentId?.toString()||componentIdStrWithScopeFromLocation,useComponentOptions);(0,_react().useEffect)(()=>onComponentChange?.(component),[component]),(0,_react().useEffect)(()=>()=>onComponentChange?.(void 0),[]);const pageItems=(0,_react().useMemo)(()=>(0,_lodash().default)(containerSlot?.values()),[containerSlot]),before=(0,_react().useMemo)(()=>pageItems.filter(x=>x.type==="before").map(x=>x.content),[pageItems]),after=(0,_react().useMemo)(()=>pageItems.filter(x=>x.type==="after").map(x=>x.content),[pageItems]);return error?error?.renderError():component?_react().default.createElement(_context().ComponentDescriptorProvider,{componentDescriptor},_react().default.createElement(_context().ComponentProvider,{component},before,_react().default.createElement("div",{className:_componentModule().default.container},routeSlot&&_react().default.createElement(_uiFoundationUiReactRouter().SlotRouter,{parentPath:`${resolvedComponentIdStr}/*`,slot:routeSlot,routes:overriddenRoutes})),after)):_react().default.createElement("div",null)}},48841:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useComponentDescriptor=exports.ComponentDescriptorContext=exports.ComponentContext=void 0;function _react(){const data=__webpack_require__(59496);return _react=function(){return data},data}function _componentModel(){const data=__webpack_require__(77237);return _componentModel=function(){return data},data}const ComponentContext=exports.ComponentContext=(0,_react().createContext)(_componentModel().ComponentModel.empty()),ComponentDescriptorContext=exports.ComponentDescriptorContext=(0,_react().createContext)(void 0),useComponentDescriptor=()=>(0,_react().useContext)(ComponentDescriptorContext);exports.useComponentDescriptor=useComponentDescriptor},9994:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentDescriptorProvider=ComponentDescriptorProvider,exports.ComponentProvider=ComponentProvider;function _react(){const data=_interopRequireDefault(__webpack_require__(59496));return _react=function(){return data},data}function _componentContext(){const data=__webpack_require__(48841);return _componentContext=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ComponentProvider({component,children}){return _react().default.createElement(_componentContext().ComponentContext.Provider,{value:component},children)}function ComponentDescriptorProvider({componentDescriptor,children}){return _react().default.createElement(_componentContext().ComponentDescriptorContext.Provider,{value:componentDescriptor},children)}},58431:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentContext",{enumerable:!0,get:function(){return _componentContext().ComponentContext}}),Object.defineProperty(exports,"ComponentDescriptorContext",{enumerable:!0,get:function(){return _componentContext().ComponentDescriptorContext}}),Object.defineProperty(exports,"ComponentDescriptorProvider",{enumerable:!0,get:function(){return _componentProvider().ComponentDescriptorProvider}}),Object.defineProperty(exports,"ComponentProvider",{enumerable:!0,get:function(){return _componentProvider().ComponentProvider}}),Object.defineProperty(exports,"useComponentDescriptor",{enumerable:!0,get:function(){return _componentContext().useComponentDescriptor}});function _componentContext(){const data=__webpack_require__(48841);return _componentContext=function(){return data},data}function _componentProvider(){const data=__webpack_require__(9994);return _componentProvider=function(){return data},data}},4744:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"COMPONENT_QUERY_LOG_FIELDS",{enumerable:!0,get:function(){return _useComponent2().COMPONENT_QUERY_LOG_FIELDS}}),Object.defineProperty(exports,"CollapsibleMenuNav",{enumerable:!0,get:function(){return _menu().CollapsibleMenuNav}}),Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return _component().Component}}),Object.defineProperty(exports,"ComponentContext",{enumerable:!0,get:function(){return _context().ComponentContext}}),Object.defineProperty(exports,"ComponentMenu",{enumerable:!0,get:function(){return _menu().ComponentMenu}}),Object.defineProperty(exports,"ComponentModel",{enumerable:!0,get:function(){return _componentModel().ComponentModel}}),Object.defineProperty(exports,"ComponentModelProps",{enumerable:!0,get:function(){return _componentModel().ComponentModelProps}}),Object.defineProperty(exports,"ComponentProvider",{enumerable:!0,get:function(){return _context().ComponentProvider}}),Object.defineProperty(exports,"ConsumeMethodSlot",{enumerable:!0,get:function(){return _menu().ConsumeMethodSlot}}),Object.defineProperty(exports,"GET_COMPONENT",{enumerable:!0,get:function(){return _useComponent2().GET_COMPONENT}}),Object.defineProperty(exports,"GET_COMPONENT_WITH_LOGS",{enumerable:!0,get:function(){return _useComponent2().GET_COMPONENT_WITH_LOGS}}),Object.defineProperty(exports,"MenuNavProps",{enumerable:!0,get:function(){return _menu().MenuNavProps}}),Object.defineProperty(exports,"TopBarNav",{enumerable:!0,get:function(){return _topBarNav().TopBarNav}}),Object.defineProperty(exports,"VersionRelatedDropdowns",{enumerable:!0,get:function(){return _menu().VersionRelatedDropdowns}}),Object.defineProperty(exports,"componentFields",{enumerable:!0,get:function(){return _useComponent2().componentFields}}),Object.defineProperty(exports,"componentFieldsWithLogs",{enumerable:!0,get:function(){return _useComponent2().componentFieldsWithLogs}}),Object.defineProperty(exports,"componentIdFields",{enumerable:!0,get:function(){return _useComponent2().componentIdFields}}),Object.defineProperty(exports,"componentOverviewFields",{enumerable:!0,get:function(){return _useComponent2().componentOverviewFields}}),Object.defineProperty(exports,"useComponent",{enumerable:!0,get:function(){return _useComponent().useComponent}}),Object.defineProperty(exports,"useComponentLogs",{enumerable:!0,get:function(){return _useComponentLogs().useComponentLogs}}),Object.defineProperty(exports,"useComponentQuery",{enumerable:!0,get:function(){return _useComponentQuery().useComponentQuery}}),Object.defineProperty(exports,"useIdFromLocation",{enumerable:!0,get:function(){return _useComponentFromLocation().useIdFromLocation}});function _menu(){const data=__webpack_require__(70820);return _menu=function(){return data},data}function _component(){const data=__webpack_require__(34146);return _component=function(){return data},data}function _componentModel(){const data=__webpack_require__(77237);return _componentModel=function(){return data},data}function _context(){const data=__webpack_require__(58431);return _context=function(){return data},data}function _topBarNav(){const data=__webpack_require__(82224);return _topBarNav=function(){return data},data}function _useComponent(){const data=__webpack_require__(21268);return _useComponent=function(){return data},data}function _useComponent2(){const data=__webpack_require__(86851);return _useComponent2=function(){return data},data}function _useComponentFromLocation(){const data=__webpack_require__(39646);return _useComponentFromLocation=function(){return data},data}function _useComponentQuery(){const data=__webpack_require__(62589);return _useComponentQuery=function(){return data},data}function _useComponentLogs(){const data=__webpack_require__(11129);return _useComponentLogs=function(){return data},data}},70820:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"CollapsibleMenuNav",{enumerable:!0,get:function(){return _menuNav().CollapsibleMenuNav}}),Object.defineProperty(exports,"ComponentMenu",{enumerable:!0,get:function(){return _menu().ComponentMenu}}),Object.defineProperty(exports,"MenuNavProps",{enumerable:!0,get:function(){return _menuNav().MenuNavProps}}),Object.defineProperty(exports,"RightSideMenuItem",{enumerable:!0,get:function(){return _menu().RightSideMenuItem}}),Object.defineProperty(exports,"RightSideMenuSlot",{enumerable:!0,get:function(){return _menu().RightSideMenuSlot}}),Object.defineProperty(exports,"VersionRelatedDropdowns",{enumerable:!0,get:function(){return _menu().VersionRelatedDropdowns}});function _menuNav(){const data=__webpack_require__(58072);return _menuNav=function(){return data},data}function _menu(){const data=__webpack_require__(23813);return _menu=function(){return data},data}},58072:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CollapsibleMenuNav=CollapsibleMenuNav;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _designNavigation(){const data=__webpack_require__(76055);return _designNavigation=function(){return data},data}function _topBarNav(){const data=__webpack_require__(82224);return _topBarNav=function(){return data},data}function _menuModule(){const data=_interopRequireDefault(__webpack_require__(82769));return _menuModule=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return typeof i=="symbol"?i:i+""}function _toPrimitive(t,r){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function TopBarNavComponent({isInMenu,menuItemProps}){const widgetDisplayText=menuItemProps?.displayName&&isInMenu?menuItemProps?.displayName:void 0;return _react().default.createElement(_topBarNav().TopBarNav,_extends({},menuItemProps,{className:(0,_classnames().default)(menuItemProps?.className,_menuModule().default.topBarNav,isInMenu&&_menuModule().default.noBorder)}),widgetDisplayText||menuItemProps?.children)}function CollapsibleMenuNav({navigationSlot,widgetSlot,navPlugins=[],widgetPlugins=[],className,secondaryNavClassName,activeTabIndex,alwaysShowActiveTab,children}){const plugins=(0,_react().useMemo)(()=>((navPlugins.length>0?navPlugins:navigationSlot?.toArray())||[]).sort(sortFn),[navigationSlot,navPlugins]),widgets=(0,_react().useMemo)(()=>((widgetPlugins.length>0?widgetPlugins:widgetSlot?.toArray())||[]).sort(sortFn),[widgetSlot,widgetPlugins]),links=[...plugins,...widgets].map(([,menuItem],index)=>{const lastPluginStyle=plugins.length-1===index?{marginRight:"auto"}:{},firstWidgetStyle=plugins.length===index?{marginLeft:"auto"}:{};return{component:TopBarNavComponent,tabProps:{menuItemProps:menuItem.props},style:_objectSpread(_objectSpread({},firstWidgetStyle),lastPluginStyle),className:menuItem.props.className}});return _react().default.createElement(_designNavigation().ResponsiveNavbar,{navClassName:(0,_classnames().default)(_menuModule().default.tab,className),secondaryNavClassName,style:{width:"100%",height:"100%"},priority:"none",tabs:links,defaultActiveIndex:activeTabIndex,alwaysShowActiveTab},children)}function sortFn([,{order:first}],[,{order:second}]){return(first??0)-(second??0)}},23813:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentMenu=ComponentMenu,exports.VersionRelatedDropdowns=VersionRelatedDropdowns,exports.defaultLoadCurrentVersion=void 0,exports.defaultLoadVersions=defaultLoadVersions;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _lodash(){const data=__webpack_require__(32699);return _lodash=function(){return data},data}function semver(){const data=_interopRequireWildcard(__webpack_require__(9131));return semver=function(){return data},data}function _componentUi(){const data=__webpack_require__(24636);return _componentUi=function(){return data},data}function _uiFoundationUi(){const data=__webpack_require__(69952);return _uiFoundationUi=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _baseReactNavigation(){const data=__webpack_require__(6231);return _baseReactNavigation=function(){return data},data}function _uiFoundationUiUseBox(){const data=__webpack_require__(53179);return _uiFoundationUiUseBox=function(){return data},data}function _lanesHooks(){const data=__webpack_require__(33461);return _lanesHooks=function(){return data},data}function _uiFoundationUiUseBox2(){const data=__webpack_require__(51114);return _uiFoundationUiUseBox2=function(){return data},data}function _useComponent(){const data=__webpack_require__(21268);return _useComponent=function(){return data},data}function _menuNav(){const data=__webpack_require__(58072);return _menuNav=function(){return data},data}function _useComponentFromLocation(){const data=__webpack_require__(39646);return _useComponentFromLocation=function(){return data},data}function _menuModule(){const data=_interopRequireDefault(__webpack_require__(82769));return _menuModule=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return typeof i=="symbol"?i:i+""}function _toPrimitive(t,r){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function getComponentIdStr(componentIdStr){return(0,_lodash().isFunction)(componentIdStr)?componentIdStr():componentIdStr}function ComponentMenu({navigationSlot,widgetSlot,className,host,menuItemSlot,consumeMethodSlot,rightSideMenuSlot,componentIdStr,skipRightSide,RightNode,useComponent,path,useComponentFilters}){const idFromLocation=(0,_useComponentFromLocation().useIdFromLocation)(),componentIdStrWithScopeFromLocation=(0,_useComponentFromLocation().useIdFromLocation)(void 0,!0),_componentIdStr=getComponentIdStr(componentIdStr),componentId=_componentIdStr?_componentId().ComponentID.fromString(_componentIdStr):void 0,resolvedComponentIdStr=path||idFromLocation,mainMenuItems=(0,_react().useMemo)(()=>(0,_lodash().groupBy)((0,_lodash().flatten)(menuItemSlot.values()),"category"),[menuItemSlot]),rightSideItems=(0,_react().useMemo)(()=>(0,_lodash().orderBy)((0,_lodash().flatten)(rightSideMenuSlot.values()),"order"),[rightSideMenuSlot]),componentFilters=useComponentFilters?.()||{},useComponentVersions=defaultLoadVersions(host,componentId?.toString()||componentIdStrWithScopeFromLocation,componentFilters,useComponent),RightSide=_react().default.createElement("div",{className:_menuModule().default.rightSide},RightNode||_react().default.createElement(_react().default.Fragment,null,_react().default.createElement(VersionRelatedDropdowns,{host,consumeMethods:consumeMethodSlot,componentId:componentId?.toString()||idFromLocation,useComponent:useComponentVersions,componentFilters}),rightSideItems.map(({item})=>item),_react().default.createElement(_uiFoundationUi().MainDropdown,{className:_menuModule().default.hideOnMobile,menuItems:mainMenuItems})));return _react().default.createElement(_reactRouterDom().Routes,null,_react().default.createElement(_reactRouterDom().Route,{path:`${resolvedComponentIdStr}/*`,element:_react().default.createElement("div",{className:(0,_classnames().default)(_menuModule().default.topBar,className)},_react().default.createElement("div",{className:_menuModule().default.leftSide},_react().default.createElement(_menuNav().CollapsibleMenuNav,{navigationSlot,widgetSlot})),!skipRightSide&&_react().default.createElement("div",{className:_menuModule().default.rightSide},RightSide))}))}function defaultLoadVersions(host,componentId,componentFilters={},useComponent,loadingFromProps){return _react().default.useCallback(_props=>{const{skip,initialLoad}=_props||{},fetchOptions={logFilters:_objectSpread(_objectSpread({},componentFilters),{},{log:_objectSpread(_objectSpread({},componentFilters.log),{},{limit:initialLoad?3:void 0})}),skip:loadingFromProps||skip,customUseComponent:useComponent},{component,loading:loadingComponent,componentLogs={}}=(0,_useComponent().useComponent)(host,componentId,fetchOptions),logs=componentLogs?.logs,loading=_react().default.useMemo(()=>loadingComponent||loadingFromProps||componentLogs.loading,[loadingComponent,loadingFromProps,componentLogs.loading]),snaps=(0,_react().useMemo)(()=>(logs||[]).filter(log=>!log.tag).map(snap=>_objectSpread(_objectSpread({},snap),{},{version:snap.hash})),[logs]),tags=(0,_react().useMemo)(()=>{const tagLookup=new Map;return(logs||[]).filter(log=>log.tag).forEach(tag=>{tagLookup.set(tag?.tag,tag)}),(0,_lodash().compact)((component?.tags?.toArray()||[]).reverse().map(tag=>tagLookup.get(tag.version.version))).map(tag=>_objectSpread(_objectSpread({},tag),{},{version:tag.tag}))},[logs]);return{loading,id:component?.id,packageName:component?.packageName,latestVersion:component?.latest,currentVersion:component?.version,snaps,tags,buildStatus:component?.buildStatus}},[componentId,loadingFromProps,componentFilters])}const defaultLoadCurrentVersion=props=>_props=>{const{skip,version:_version}=_props||{},{snaps,tags,currentVersion,loading}=props.useComponent?.({skip,id:props.componentId})??{},version=_version??currentVersion;return _react().default.useMemo(()=>semver().valid(version),[loading,version])?_react().default.useMemo(()=>tags?.find(tag=>tag.tag===version),[loading,tags?.length,version]):_react().default.useMemo(()=>snaps?.find(snap=>snap.version===version),[loading,snaps?.length,version])};exports.defaultLoadCurrentVersion=defaultLoadCurrentVersion;function VersionRelatedDropdowns(props){const updatedPropsWithDefaults=_objectSpread(_objectSpread({},props),{},{useLanes:props.useLanes??_lanesHooks().useLanes,dropdownOptions:_objectSpread(_objectSpread({},props.dropdownOptions),{},{showVersionDetails:props?.dropdownOptions?.showVersionDetails??!0})}),loadVersion=defaultLoadCurrentVersion(updatedPropsWithDefaults),{useLanes,consumeMethods,className,dropdownOptions,host}=updatedPropsWithDefaults,{loading,id,tags,snaps,latest,packageName,currentVersion:_currentVersion}=props.useComponent?.({initialLoad:!0})||{},location=(0,_baseReactNavigation().useLocation)(),{lanesModel}=useLanes(),lanes=id?lanesModel?.getLanesByComponentId(id)?.filter(lane=>!lane.id.isDefault())||[]:[],viewedLane=lanesModel?.viewedLane?.id&&!lanesModel?.viewedLane?.id.isDefault()?lanesModel.viewedLane:void 0,isWorkspace=host==="teambit.workspace/workspace",isNew=tags?.length===0&&snaps?.length===0,localVersion=isWorkspace&&!isNew&&(!viewedLane||lanesModel?.isViewingCurrentLane()),currentVersion=isWorkspace&&!isNew&&!location?.search.includes("version")?"workspace":_currentVersion??"",consumeMethodProps=_react().default.useMemo(()=>id?{id,packageName:packageName??"",latest,options:{viewedLane,disableInstall:!packageName}}:void 0,[id,packageName,latest,viewedLane]),methods=useConsumeMethods(consumeMethods,consumeMethodProps),hasMethods=methods?.length>0;return _react().default.createElement(_react().default.Fragment,null,consumeMethods&&id&&hasMethods&&_react().default.createElement(_uiFoundationUiUseBox().UseBoxDropdown,{position:"bottom-end",className:(0,_classnames().default)(_menuModule().default.useBox,_menuModule().default.hideOnMobile),Menu:_react().default.createElement(_uiFoundationUiUseBox2().Menu,{methods,componentName:id.name})}),_react().default.createElement(_componentUi().VersionDropdown,{lanes,loading,useComponentVersions:props.useComponent,hasMoreVersions:!isNew,useCurrentVersionLog:loadVersion,localVersion,currentVersion,latestVersion:latest,currentLane:viewedLane,className,menuClassName:_menuModule().default.componentVersionMenu,getActiveTabIndex:dropdownOptions?.getActiveTabIndex,showVersionDetails:dropdownOptions?.showVersionDetails}))}function useConsumeMethods(consumeMethods,consumePluginProps){return(0,_react().useMemo)(()=>(0,_lodash().flatten)(consumeMethods?.values()).map(method=>{if(!!consumePluginProps)return method?.(consumePluginProps)}).filter(x=>!!x&&x.Component&&x.Title),[consumeMethods,consumePluginProps])}},82224:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _topBarNav=__webpack_require__(13264);Object.keys(_topBarNav).forEach(function(key){key==="default"||key==="__esModule"||key in exports&&exports[key]===_topBarNav[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _topBarNav[key]}})})},13264:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TopBarNav=TopBarNav;function _react(){const data=_interopRequireDefault(__webpack_require__(59496));return _react=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}function _baseReactNavigation(){const data=__webpack_require__(6231);return _baseReactNavigation=function(){return data},data}function _topBarNavModule(){const data=_interopRequireDefault(__webpack_require__(37987));return _topBarNavModule=function(){return data},data}const _excluded=["href","className","activeClassName","children","displayName","ignoreQueryParams"];function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}const Link=_baseReactNavigation().Link;function TopBarNav(_ref){let{href,className,activeClassName,children,displayName,ignoreQueryParams}=_ref,rest=_objectWithoutProperties(_ref,_excluded);const{search}=(0,_reactRouterDom().useLocation)(),preventPassingDisplayNameToLink=displayName,target=href&&!ignoreQueryParams&&`${href}${search}`||href;return _react().default.createElement(Link,_extends({},rest,{className:(0,_classnames().default)(className,_topBarNavModule().default.topBarLink),activeClassName:(0,_classnames().default)(activeClassName,_topBarNavModule().default.active),href:target}),_react().default.createElement("div",null,children))}},39646:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useIdFromLocation=useIdFromLocation;function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}const componentRegex=/^[\w/-]*[\w-]/;function useIdFromLocation(url,deriveScopeFromSearchParams){const params=(0,_reactRouterDom().useParams)(),[searchParams]=(0,_reactRouterDom().useSearchParams)(),scopeFromQueryParams=searchParams.get("scope")??void 0,splat=url||params["*"];if(!splat)return;const[maybeOrgWithScope,...maybeFullName]=splat.split("/"),hasScope=maybeOrgWithScope.split(".").length>1,fullNameFromUrl=hasScope?maybeFullName.join("/"):splat;let scope;hasScope&&(scope=maybeOrgWithScope),!hasScope&&deriveScopeFromSearchParams&&(scope=scopeFromQueryParams);const match=componentRegex.exec(fullNameFromUrl);if(!!match?.[0])return scope?`${scope}/${match[0]}`:match[0]}},11129:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useComponentLogs=useComponentLogs,exports.useComponentLogsInit=useComponentLogsInit;function _react(){const data=__webpack_require__(59496);return _react=function(){return data},data}function _uiFoundationUiHooks(){const data=__webpack_require__(48474);return _uiFoundationUiHooks=function(){return data},data}function _useComponent(){const data=__webpack_require__(86851);return _useComponent=function(){return data},data}function _componentError(){const data=__webpack_require__(70145);return _componentError=function(){return data},data}function _useComponent2(){const data=__webpack_require__(12645);return _useComponent2=function(){return data},data}function _(){const data=__webpack_require__(68211);return _=function(){return data},data}function useComponentLogs(componentId,host,filters,skipFromProps){const{variables,skip}=useComponentLogsInit(componentId,host,filters,skipFromProps),{data,error,loading}=(0,_uiFoundationUiHooks().useDataQuery)(_useComponent().GET_COMPONENT_WITH_LOGS,{variables,skip,errorPolicy:"all"}),rawComponent=data?.getHost?.get,rawCompLogs=rawComponent?.logs,componentError=error&&!data?new(_componentError()).ComponentError(500,error.message):!rawComponent&&!loading&&new(_componentError()).ComponentError(404)||void 0,idDepKey=rawComponent?.id?`${rawComponent?.id?.scope}/${rawComponent?.id?.name}@${rawComponent?.id?.version}}`:void 0,id=(0,_react().useMemo)(()=>rawComponent?_().ComponentID.fromObject(rawComponent.id):void 0,[idDepKey]);return{loading,id,packageName:rawComponent?.packageName,latest:rawComponent?.latest,error:componentError,componentLogs:{logs:rawCompLogs,loading}}}function useComponentLogsInit(componentId,host,filters,skip){const{log}=filters||{},{head:logHead,offset:logOffset,sort:logSort,limit:logLimit,type:logType,takeHeadFromComponent:logTakeHeadFromComponent}=log||{},variables={id:componentId,extensionId:host,logOffset:(0,_useComponent2().getOffsetValue)(logOffset,logLimit),logLimit,logType,logHead,logSort,logTakeHeadFromComponent};return{logOffset,variables,skip}}},62589:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useComponentQuery=useComponentQuery;function _react(){const data=__webpack_require__(59496);return _react=function(){return data},data}function _uiFoundationUiHooks(){const data=__webpack_require__(48474);return _uiFoundationUiHooks=function(){return data},data}function _componentId(){const data=__webpack_require__(99978);return _componentId=function(){return data},data}function _componentDescriptor(){const data=__webpack_require__(57984);return _componentDescriptor=function(){return data},data}function _componentModel(){const data=__webpack_require__(77237);return _componentModel=function(){return data},data}function _useComponent(){const data=__webpack_require__(86851);return _useComponent=function(){return data},data}function _useComponentLogs(){const data=__webpack_require__(11129);return _useComponentLogs=function(){return data},data}function _componentError(){const data=__webpack_require__(70145);return _componentError=function(){return data},data}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r2){_defineProperty(e,r2,t[r2])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return typeof i=="symbol"?i:i+""}function _toPrimitive(t,r){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function useComponentQuery(componentId,host,filters,skip){const idRef=(0,_react().useRef)(componentId);idRef.current=componentId;const variables={id:componentId,extensionId:host},{data,error,loading,subscribeToMore}=(0,_uiFoundationUiHooks().useDataQuery)(_useComponent().GET_COMPONENT,{variables,skip,errorPolicy:"all"}),{loading:loadingLogs,componentLogs:{logs}={}}=(0,_useComponentLogs().useComponentLogs)(componentId,host,filters,skip),rawComponent=data?.getHost?.get;(0,_react().useEffect)(()=>{if(host!=="teambit.workspace/workspace")return()=>{};const unsubAddition=subscribeToMore({document:_useComponent().SUB_SUBSCRIPTION_ADDED,updateQuery:(prev,{subscriptionData})=>{const prevComponent=prev?.getHost?.get,addedComponent=subscriptionData?.data?.componentAdded?.component;return!addedComponent||prevComponent?prev:idRef.current===addedComponent.id.name?_objectSpread(_objectSpread({},prev),{},{getHost:_objectSpread(_objectSpread({},prev.getHost),{},{get:addedComponent})}):prev}}),unsubChanges=subscribeToMore({document:_useComponent().SUB_COMPONENT_CHANGED,updateQuery:(prev,{subscriptionData})=>{if(!subscriptionData.data)return prev;const prevComponent=prev?.getHost?.get,updatedComponent=subscriptionData?.data?.componentChanged?.component;return updatedComponent&&_componentId().ComponentID.isEqualObj(prevComponent?.id,updatedComponent?.id)?_objectSpread(_objectSpread({},prev),{},{getHost:_objectSpread(_objectSpread({},prev.getHost),{},{get:updatedComponent})}):prev}}),unsubRemoval=subscribeToMore({document:_useComponent().SUB_COMPONENT_REMOVED,updateQuery:(prev,{subscriptionData})=>{if(!subscriptionData.data)return prev;const prevComponent=prev?.getHost?.get,removedIds=subscriptionData?.data?.componentRemoved?.componentIds;return!prevComponent||!removedIds?.length?prev:removedIds.some(removedId=>_componentId().ComponentID.isEqualObj(removedId,prevComponent.id))?_objectSpread(_objectSpread({},prev),{},{getHost:_objectSpread(_objectSpread({},prev.getHost),{},{get:null})}):prev}});return()=>{unsubChanges(),unsubAddition(),unsubRemoval()}},[]);const idDepKey=rawComponent?.id?`${rawComponent?.id?.scope}/${rawComponent?.id?.name}@${rawComponent?.id?.version}}`:void 0,id=(0,_react().useMemo)(()=>rawComponent?_componentId().ComponentID.fromObject(rawComponent.id):void 0,[idDepKey]),componentError=error&&!data?new(_componentError()).ComponentError(500,error.message):!rawComponent&&!loading&&new(_componentError()).ComponentError(404)||void 0,component=(0,_react().useMemo)(()=>rawComponent?_componentModel().ComponentModel.from(_objectSpread(_objectSpread({},rawComponent),{},{host,logs})):void 0,[id?.toString(),logs]),componentDescriptor=(0,_react().useMemo)(()=>{const aspectList={entries:rawComponent?.aspects.map(aspectObject=>_objectSpread(_objectSpread({},aspectObject),{},{aspectId:aspectObject.id,aspectData:aspectObject.data}))};return id?_componentDescriptor().ComponentDescriptor.fromObject({id:id.toString(),aspectList}):void 0},[id?.toString()]);return(0,_react().useMemo)(()=>({componentDescriptor,component,componentLogs:{loading:loadingLogs,logs},error:componentError||void 0,loading}),[host,component,componentDescriptor,componentError])}},86851:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.componentOverviewFields=exports.componentIdFields=exports.componentFieldsWithLogs=exports.componentFields=exports.SUB_SUBSCRIPTION_ADDED=exports.SUB_COMPONENT_REMOVED=exports.SUB_COMPONENT_CHANGED=exports.GET_COMPONENT_WITH_LOGS=exports.GET_COMPONENT=exports.COMPONENT_QUERY_LOG_FIELDS=void 0;function _client(){const data=__webpack_require__(53574);return _client=function(){return data},data}const componentIdFields=exports.componentIdFields=(0,_client().gql)`
|
388
388
|
fragment componentIdFields on ComponentID {
|
389
389
|
name
|
390
390
|
version
|
@@ -536,7 +536,7 @@ the following are permitted ${Object.keys(exports.IssuesClasses).join(", ")}`);c
|
|
536
536
|
}
|
537
537
|
}
|
538
538
|
${componentIdFields}
|
539
|
-
`},21268:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Filters",{enumerable:!0,get:function(){return _useComponent().Filters}}),Object.defineProperty(exports,"UseComponentType",{enumerable:!0,get:function(){return _useComponent().UseComponentType}}),exports.useComponent=useComponent;function _uiFoundationUiReactRouter(){const data=__webpack_require__(46718);return _uiFoundationUiReactRouter=function(){return data},data}function _useComponentQuery(){const data=__webpack_require__(62589);return _useComponentQuery=function(){return data},data}function _useComponent(){const data=__webpack_require__(48166);return _useComponent=function(){return data},data}function useComponent(host,id,options){const query=(0,_uiFoundationUiReactRouter().useQuery)(),{version,logFilters,customUseComponent,skip}=options||{},componentVersion=(version||query.get("version"))??void 0,componentIdStr=id&&withVersion(id,componentVersion);return(customUseComponent||_useComponentQuery().useComponentQuery)(componentIdStr||"",host,logFilters,skip||!id)}function withVersion(id,version){return!version||id.includes("@")?id:`${id}@${version}`}},48166:()=>{"use strict"},12645:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getOffsetValue=getOffsetValue;function getOffsetValue(offset,limit,backwards=!1){if(offset!==void 0)return backwards?-(offset+limit):offset;if(limit!==void 0)return 0}},25408:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PreviewSkeleton=exports.CompositionCardSkeleton=void 0;const react_1=__importDefault(__webpack_require__(59496)),base_ui_loaders_skeleton_1=__webpack_require__(20298),composition_card_skeleton_module_scss_1=__importDefault(__webpack_require__(62342));function CompositionCardSkeleton(){return react_1.default.createElement("div",{className:composition_card_skeleton_module_scss_1.default.compositionCardSkeleton},react_1.default.createElement(PreviewSkeleton,null),react_1.default.createElement("div",{className:composition_card_skeleton_module_scss_1.default.bottom},react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"104px"})))}exports.CompositionCardSkeleton=CompositionCardSkeleton;function PreviewSkeleton(){return react_1.default.createElement("div",{className:composition_card_skeleton_module_scss_1.default.preview},react_1.default.createElement(base_ui_loaders_skeleton_1.BlockSkeleton,{lines:2,className:composition_card_skeleton_module_scss_1.default.block}),react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"208px"}),react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"152px"}),react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"88px"}))}exports.PreviewSkeleton=PreviewSkeleton},78647:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PreviewSkeleton=exports.CompositionCardSkeleton=void 0;var composition_card_skeleton_1=__webpack_require__(25408);Object.defineProperty(exports,"CompositionCardSkeleton",{enumerable:!0,get:function(){return composition_card_skeleton_1.CompositionCardSkeleton}}),Object.defineProperty(exports,"PreviewSkeleton",{enumerable:!0,get:function(){return composition_card_skeleton_1.PreviewSkeleton}})},94075:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionCard=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),evangelist_elements_icon_1=__webpack_require__(86144),compositions_1=__webpack_require__(32552),design_ui_styles_ellipsis_1=__webpack_require__(2997),composition_card_module_scss_1=__importDefault(__webpack_require__(6998));exports.CompositionCard=react_1.default.memo(_CompositionCard);function _CompositionCard(_a){var{composition,component,className,openCompositionLink,previewClass}=_a,rest=__rest(_a,["composition","component","className","openCompositionLink","previewClass"]);const Composition=react_1.default.useMemo(()=>react_1.default.createElement(compositions_1.ComponentComposition,{disableScroll:!0,className:previewClass,includeEnv:!1,loading:"lazy",composition,component,viewport:1280,previewName:"compositions"}),[composition.identifier,component.id.toString(),previewClass]);return react_1.default.createElement("div",Object.assign({},rest,{key:composition.identifier,className:(0,classnames_1.default)(composition_card_module_scss_1.default.compositionCard,className)}),react_1.default.createElement("div",{className:composition_card_module_scss_1.default.compositionPreview},Composition),react_1.default.createElement("div",{className:composition_card_module_scss_1.default.bottom},react_1.default.createElement("span",{className:(0,classnames_1.default)(design_ui_styles_ellipsis_1.ellipsis,composition_card_module_scss_1.default.displayName)},composition.displayName),openCompositionLink&&react_1.default.createElement("a",{className:composition_card_module_scss_1.default.link,target:"_blank",rel:"noopener noreferrer",href:openCompositionLink},react_1.default.createElement(evangelist_elements_icon_1.Icon,{className:composition_card_module_scss_1.default.icon,of:"open-tab"}))))}},75797:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionCardSkeleton=exports.CompositionCard=void 0;var composition_card_1=__webpack_require__(94075);Object.defineProperty(exports,"CompositionCard",{enumerable:!0,get:function(){return composition_card_1.CompositionCard}});var composition_card_skeleton_1=__webpack_require__(78647);Object.defineProperty(exports,"CompositionCardSkeleton",{enumerable:!0,get:function(){return composition_card_skeleton_1.CompositionCardSkeleton}})},4405:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.humanizeCompositionId=void 0;const humanize_string_1=__importDefault(__webpack_require__(28583));function humanizeCompositionId(rawId){return(0,humanize_string_1.default)(rawId)}exports.humanizeCompositionId=humanizeCompositionId},91888:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.humanizeCompositionId=void 0;var humanize_1=__webpack_require__(4405);Object.defineProperty(exports,"humanizeCompositionId",{enumerable:!0,get:function(){return humanize_1.humanizeCompositionId}})},94659:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionGallerySkeleton=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),base_ui_loaders_skeleton_1=__webpack_require__(20298),composition_card_1=__webpack_require__(75797),composition_gallery_skeleton_module_scss_1=__importDefault(__webpack_require__(9092));function CompositionGallerySkeleton(_a){var{compositionsLength,className}=_a,rest=__rest(_a,["compositionsLength","className"]);const length=Array.from(Array(compositionsLength));return react_1.default.createElement("div",Object.assign({},rest,{className:(0,classnames_1.default)(composition_gallery_skeleton_module_scss_1.default.compositionGallerySkeleton,className)}),react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"100px",className:composition_gallery_skeleton_module_scss_1.default.title}),react_1.default.createElement("div",{className:(0,classnames_1.default)(composition_gallery_skeleton_module_scss_1.default.compositionGalleryGrid)},length.map((_,index)=>react_1.default.createElement(composition_card_1.CompositionCardSkeleton,{key:`comp-card-skeleton-${index}`}))))}exports.CompositionGallerySkeleton=CompositionGallerySkeleton},67343:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionGallerySkeleton=void 0;var composition_gallery_skeleton_1=__webpack_require__(94659);Object.defineProperty(exports,"CompositionGallerySkeleton",{enumerable:!0,get:function(){return composition_gallery_skeleton_1.CompositionGallerySkeleton}})},94478:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionGallery=void 0;const react_1=__importDefault(__webpack_require__(59496)),design_elements_icon_1=__webpack_require__(29284),documenter_ui_linked_heading_1=__webpack_require__(19058),base_react_navigation_link_1=__webpack_require__(98560),composition_card_1=__webpack_require__(75797),composition_gallery_module_scss_1=__importDefault(__webpack_require__(52174));function CompositionGallery({component}){const navigate=(0,base_react_navigation_link_1.useNavigate)();return component.compositions.length>0?react_1.default.createElement("div",{className:composition_gallery_module_scss_1.default.compositionGallery},react_1.default.createElement(documenter_ui_linked_heading_1.LinkedHeading,{size:"sm",className:composition_gallery_module_scss_1.default.title},react_1.default.createElement(design_elements_icon_1.Icon,{of:"eye"})," ",react_1.default.createElement("span",null,"PREVIEW")),react_1.default.createElement("div",{className:composition_gallery_module_scss_1.default.carousel},component.compositions.map(composition=>react_1.default.createElement(composition_card_1.CompositionCard,{key:composition.identifier.toLowerCase(),onClick:()=>navigate(`~compositions/${composition.identifier.toLowerCase()}`),className:composition_gallery_module_scss_1.default.compositionGalleryCard,previewClass:composition_gallery_module_scss_1.default.preview,composition,component})))):null}exports.CompositionGallery=CompositionGallery},10726:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionGallerySkeleton=exports.CompositionGallery=void 0;var composition_gallery_1=__webpack_require__(94478);Object.defineProperty(exports,"CompositionGallery",{enumerable:!0,get:function(){return composition_gallery_1.CompositionGallery}});var composition_gallery_skeleton_1=__webpack_require__(67343);Object.defineProperty(exports,"CompositionGallerySkeleton",{enumerable:!0,get:function(){return composition_gallery_skeleton_1.CompositionGallerySkeleton}})},39708:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Composition=void 0;function _compositionsModel(){const data=__webpack_require__(91888);return _compositionsModel=function(){return data},data}class Composition{constructor(identifier,filepath,_displayName){this.identifier=identifier,this.filepath=filepath,this._displayName=_displayName}get displayName(){return this._displayName||(0,_compositionsModel().humanizeCompositionId)(this.identifier)}toObject(){return{identifier:this.identifier,filepath:this.filepath,displayName:this._displayName}}toBrowserMetaDataObject(){return{identifier:this.identifier,displayName:this._displayName}}static fromArray(compositions){return compositions.map(composition=>new Composition(composition.identifier,composition.filepath,composition.displayName))}}exports.Composition=Composition},82704:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionContent=CompositionContent,exports.Compositions=Compositions;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}function _lodash(){const data=_interopRequireDefault(__webpack_require__(40733));return _lodash=function(){return data},data}function _queryString(){const data=_interopRequireDefault(__webpack_require__(42546));return _queryString=function(){return data},data}function _documenterTheme(){const data=__webpack_require__(18170);return _documenterTheme=function(){return data},data}function _baseUiSurfacesSplitPane(){const data=__webpack_require__(4792);return _baseUiSurfacesSplitPane=function(){return data},data}function _baseUiSurfacesSplitPane2(){const data=__webpack_require__(56007);return _baseUiSurfacesSplitPane2=function(){return data},data}function _component(){const data=__webpack_require__(68211);return _component=function(){return data},data}function _documenterUi(){const data=__webpack_require__(3405);return _documenterUi=function(){return data},data}function _panels(){const data=__webpack_require__(52515);return _panels=function(){return data},data}function _docsUiQueries(){const data=__webpack_require__(82718);return _docsUiQueries=function(){return data},data}function _uiFoundationUiButtons(){const data=__webpack_require__(32098);return _uiFoundationUiButtons=function(){return data},data}function _designUi(){const data=__webpack_require__(89673);return _designUi=function(){return data},data}function _previewUi(){const data=__webpack_require__(27699);return _previewUi=function(){return data},data}function _uiFoundationUiHooks(){const data=__webpack_require__(87082);return _uiFoundationUiHooks=function(){return data},data}function _compositionsUi(){const data=__webpack_require__(10421);return _compositionsUi=function(){return data},data}function _compositionsUiHooks(){const data=__webpack_require__(77972);return _compositionsUiHooks=function(){return data},data}function _mdxUi(){const data=__webpack_require__(32363);return _mdxUi=function(){return data},data}function _designUi2(){const data=__webpack_require__(12563);return _designUi2=function(){return data},data}function _documenterUi2(){const data=__webpack_require__(37742);return _documenterUi2=function(){return data},data}function _designUi3(){const data=__webpack_require__(35682);return _designUi3=function(){return data},data}function _baseReactNavigation(){const data=__webpack_require__(98560);return _baseReactNavigation=function(){return data},data}function _designUiInput(){const data=__webpack_require__(11276);return _designUiInput=function(){return data},data}function _designUiSurfaces(){const data=__webpack_require__(56493);return _designUiSurfaces=function(){return data},data}function _designUi4(){const data=__webpack_require__(93976);return _designUi4=function(){return data},data}function _compositionsModule(){const data=_interopRequireDefault(__webpack_require__(94042));return _compositionsModule=function(){return data},data}function _ui(){const data=__webpack_require__(29066);return _ui=function(){return data},data}function _compositionsPanel(){const data=__webpack_require__(14427);return _compositionsPanel=function(){return data},data}const _excluded=["component","selected","queryParams","emptyState"];function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}const Link=_baseReactNavigation().Link;function Compositions({menuBarWidgets,emptyState}){const component=(0,_react().useContext)(_component().ComponentContext),[searchParams]=(0,_reactRouterDom().useSearchParams)(),params=(0,_reactRouterDom().useParams)(),versionFromQueryParams=searchParams.get("version"),navigate=(0,_baseReactNavigation().useNavigate)(),location=(0,_baseReactNavigation().useLocation)(),currentCompositionName=params["*"],currentComposition=component.compositions.find(composition=>composition.identifier.toLowerCase()===currentCompositionName)||(0,_lodash().default)(component.compositions),selectedRef=(0,_react().useRef)(currentComposition);selectedRef.current=currentComposition;const properties=(0,_docsUiQueries().useDocs)(component.id),showSidebar=!(0,_uiFoundationUiHooks().useIsMobile)()&&component.compositions.length>0,[isSidebarOpen,setSidebarOpenness]=(0,_react().useState)(showSidebar),sidebarOpenness=isSidebarOpen?_baseUiSurfacesSplitPane().Layout.row:_baseUiSurfacesSplitPane().Layout.left,compositionUrl=(0,_previewUi().toPreviewUrl)(component,"compositions"),isScaling=component?.preview?.isScaling,includesEnvTemplates=component?.preview?.includesEnvTemplate,useNameParam=component?.preview?.useNameParam,compositionIdentifierParam=useNameParam||isScaling&&includesEnvTemplates===!1?`name=${currentComposition?.identifier}`:currentComposition?.identifier,currentCompositionFullUrl=(0,_previewUi().toPreviewUrl)(component,"compositions",compositionIdentifierParam),[compositionParams,setCompositionParams]=(0,_react().useState)({fullscreen:!0}),queryParams=(0,_react().useMemo)(()=>_queryString().default.stringify(compositionParams),[compositionParams]);return(0,_react().useEffect)(()=>setSidebarOpenness(showSidebar),[showSidebar]),_react().default.createElement(_compositionsUiHooks().CompositionContextProvider,{queryParams:compositionParams,setQueryParams:setCompositionParams},_react().default.createElement(_baseUiSurfacesSplitPane().SplitPane,{layout:sidebarOpenness,size:"85%",className:_compositionsModule().default.compositionsPage},_react().default.createElement(_baseUiSurfacesSplitPane().Pane,{className:_compositionsModule().default.left},_react().default.createElement(_compositionsUi().CompositionsMenuBar,{menuBarWidgets,className:_compositionsModule().default.menuBar},_react().default.createElement(_designUi4().Tooltip,{content:"Open in new tab",placement:"right"},_react().default.createElement(Link,{external:!0,href:currentCompositionFullUrl,className:_compositionsModule().default.openInNewTab},_react().default.createElement(_designUiInput().OptionButton,{icon:"open-tab"})))),_react().default.createElement(CompositionContent,{className:_compositionsModule().default.compositionPanel,emptyState,component,selected:currentComposition,queryParams})),_react().default.createElement(_baseUiSurfacesSplitPane2().HoverSplitter,{className:_compositionsModule().default.splitter},_react().default.createElement(_uiFoundationUiButtons().Collapser,{placement:"left",isOpen:isSidebarOpen,onMouseDown:e=>e.stopPropagation(),onClick:()=>setSidebarOpenness(x=>!x),tooltipContent:`${isSidebarOpen?"Hide":"Show"} side compositions`,className:_compositionsModule().default.collapser})),_react().default.createElement(_baseUiSurfacesSplitPane().Pane,{className:_compositionsModule().default.right},_react().default.createElement(_documenterTheme().ThemeContext,null,_react().default.createElement(_panels().TabContainer,{className:_compositionsModule().default.tabsContainer},_react().default.createElement(_panels().TabList,{className:_compositionsModule().default.tabs},_react().default.createElement(_panels().Tab,null,"compositions"),_react().default.createElement(_panels().Tab,null,"properties")),_react().default.createElement(_panels().TabPanel,{className:_compositionsModule().default.tabContent},_react().default.createElement(_compositionsPanel().CompositionsPanel,{isScaling,useNameParam,includesEnvTemplate:component.preview?.includesEnvTemplate,onSelectComposition:composition=>{if(!currentComposition||!location)return;const selectedCompositionFromUrl=params["*"],pathSegments=location.pathname.split("/").filter(x=>x);selectedCompositionFromUrl?pathSegments[pathSegments.length-1]=composition.identifier.toLowerCase():pathSegments.push(composition.identifier.toLowerCase());const urlParams=new URLSearchParams(searchParams);versionFromQueryParams&&urlParams.set("version",versionFromQueryParams);const newPath=pathSegments.join("/");navigate(`/${newPath}?${urlParams.toString()}`)},url:compositionUrl,compositions:component.compositions,active:currentComposition})),_react().default.createElement(_panels().TabPanel,{className:_compositionsModule().default.tabContent},properties&&properties.length>0?_react().default.createElement(_documenterUi().PropTable,{rows:properties,showListView:!0}):_react().default.createElement("div",null)))))))}function CompositionContent(_ref){let{component,selected,queryParams,emptyState}=_ref,componentCompositionProps=_objectWithoutProperties(_ref,_excluded);const env=component.environment?.id,EmptyStateTemplate=emptyState?.get(env||"");return component.compositions.length===0&&component.host==="teambit.workspace/workspace"&&EmptyStateTemplate?_react().default.createElement("div",{className:_compositionsModule().default.noCompositionsPage},_react().default.createElement("div",null,_react().default.createElement(_documenterUi2().H1,{className:_compositionsModule().default.title},"Compositions"),_react().default.createElement(_designUi2().Separator,{isPresentational:!0,className:_compositionsModule().default.separator}),_react().default.createElement(_designUi3().AlertCard,{level:"info",title:"There are no compositions for this Component. Learn how to add compositions:"},_react().default.createElement(_mdxUi().MDXLayout,null,_react().default.createElement(EmptyStateTemplate,null))))):component?.buildStatus==="pending"&&component?.host==="teambit.scope/scope"?_react().default.createElement(_designUiSurfaces().StatusMessageCard,{className:_compositionsModule().default.buildStatusMessage,status:"PROCESSING",title:"component preview pending"},"this might take some time"):component?.buildStatus==="failed"&&component?.host==="teambit.scope/scope"?_react().default.createElement(_designUiSurfaces().StatusMessageCard,{className:_compositionsModule().default.buildStatusMessage,status:"FAILURE",title:"failed to get component preview "}):component.compositions.length===0?_react().default.createElement(_designUi().EmptyBox,{title:"There are no compositions for this component.",linkText:"Learn how to create compositions",link:"https://bit.dev/reference/dev-services-overview/compositions/compositions-overview"}):_react().default.createElement(_ui().ComponentComposition,_extends({className:_compositionsModule().default.compositionsIframe,viewport:null,component,forceHeight:"100%",composition:selected,fullContentHeight:!0,pubsub:!0,queryParams},componentCompositionProps))}},32552:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentComposition",{enumerable:!0,get:function(){return _ui().ComponentComposition}}),Object.defineProperty(exports,"Composition",{enumerable:!0,get:function(){return _composition().Composition}}),Object.defineProperty(exports,"CompositionContent",{enumerable:!0,get:function(){return _compositions2().CompositionContent}}),Object.defineProperty(exports,"CompositionsAspect",{enumerable:!0,get:function(){return _compositions().CompositionsAspect}}),exports.default=void 0;function _compositions(){const data=__webpack_require__(36717);return _compositions=function(){return data},data}function _composition(){const data=__webpack_require__(39708);return _composition=function(){return data},data}function _compositions2(){const data=__webpack_require__(82704);return _compositions2=function(){return data},data}function _ui(){const data=__webpack_require__(29066);return _ui=function(){return data},data}var _default=exports.default=_compositions().CompositionsAspect},23700:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentComposition=ComponentComposition;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _previewUi(){const data=__webpack_require__(27699);return _previewUi=function(){return data},data}const _excluded=["composition","component","queryParams"];function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}function ComponentComposition(_ref){let{composition,component,queryParams=[]}=_ref,rest=_objectWithoutProperties(_ref,_excluded);const includesEnvTemplate=component.preview?.includesEnvTemplate,isScaling=component.preview?.isScaling,shouldAddNameParam=component.preview?.useNameParam||isScaling&&includesEnvTemplate===!1,compositionParams=(0,_react().useMemo)(()=>(composition?[shouldAddNameParam?`name=${composition.identifier}`:composition.identifier]:[]).concat(queryParams),[composition?.identifier,queryParams]);return _react().default.createElement(_previewUi().ComponentPreview,_extends({},rest,{component,style:{width:"100%",height:"100%"},previewName:"compositions",queryParams:compositionParams}))}},14427:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionsPanel=CompositionsPanel;function _evangelistElements(){const data=__webpack_require__(86144);return _evangelistElements=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _uiFoundationUi(){const data=__webpack_require__(13202);return _uiFoundationUi=function(){return data},data}function _designUi(){const data=__webpack_require__(93976);return _designUi=function(){return data},data}function _baseReactNavigation(){const data=__webpack_require__(98560);return _baseReactNavigation=function(){return data},data}function _compositionsPanelModule(){const data=_interopRequireDefault(__webpack_require__(29217));return _compositionsPanelModule=function(){return data},data}const _excluded=["url","compositions","isScaling","onSelectComposition","active","includesEnvTemplate","useNameParam","className"];function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}function CompositionsPanel(_ref){let{url,compositions,isScaling,onSelectComposition:onSelect,active,includesEnvTemplate,useNameParam,className}=_ref,rest=_objectWithoutProperties(_ref,_excluded);const shouldAddNameParam=useNameParam||isScaling&&includesEnvTemplate===!1,handleSelect=(0,_react().useCallback)(selected=>{onSelect&&onSelect(selected)},[onSelect]),location=(0,_baseReactNavigation().useLocation)(),[searchParams]=(0,_reactRouterDom().useSearchParams)(),versionFromQueryParams=searchParams.get("version"),navigate=(0,_baseReactNavigation().useNavigate)(),onCompositionCodeClicked=(0,_react().useCallback)(composition=>e=>{e.preventDefault();const queryParams=new URLSearchParams;versionFromQueryParams&&queryParams.set("version",versionFromQueryParams);const basePath=location?.pathname.split("/~compositions")[0];navigate(`${basePath}/~code/${composition.filepath}?${queryParams.toString()}#search=${composition.identifier}`)},[location?.pathname,versionFromQueryParams]);return _react().default.createElement("ul",_extends({},rest,{className:(0,_classnames().default)(className)}),compositions.map(composition=>{const href=shouldAddNameParam?`${url}&name=${composition.identifier}`:`${url}&${composition.identifier}`;return _react().default.createElement("li",{key:composition.identifier,className:(0,_classnames().default)(_compositionsPanelModule().default.linkWrapper,composition===active&&_compositionsPanelModule().default.active)},_react().default.createElement("a",{className:_compositionsPanelModule().default.panelLink,onClick:()=>handleSelect(composition)},_react().default.createElement("span",{className:_compositionsPanelModule().default.box}),_react().default.createElement("span",{className:_compositionsPanelModule().default.name},composition.displayName)),_react().default.createElement("div",{className:_compositionsPanelModule().default.right},_react().default.createElement(_uiFoundationUi().MenuWidgetIcon,{className:_compositionsPanelModule().default.codeLink,icon:"Code",tooltipContent:"Code",onClick:onCompositionCodeClicked(composition)}),_react().default.createElement(_designUi().Tooltip,{content:"Open in new tab",placement:"bottom"},_react().default.createElement("a",{className:_compositionsPanelModule().default.panelLink,target:"_blank",rel:"noopener noreferrer",href},_react().default.createElement(_evangelistElements().Icon,{className:_compositionsPanelModule().default.icon,of:"open-tab"})))))}))}},29066:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentComposition",{enumerable:!0,get:function(){return _compositionPreview().ComponentComposition}});function _compositionPreview(){const data=__webpack_require__(23700);return _compositionPreview=function(){return data},data}},69124:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AccountTypes=void 0;const react_1=__importDefault(__webpack_require__(59496)),default_avatar_1=__webpack_require__(27144),org_avatar_1=__webpack_require__(27636),user_avatar_1=__webpack_require__(18088);var AccountTypes;(function(AccountTypes2){AccountTypes2.org="organization",AccountTypes2.user="user",AccountTypes2.default="default"})(AccountTypes||(exports.AccountTypes=AccountTypes={}));function Avatar(props){const{account}=props;switch(account.accountType){case AccountTypes.user:return react_1.default.createElement(user_avatar_1.UserAvatar,Object.assign({},props));case AccountTypes.org:return react_1.default.createElement(org_avatar_1.OrgAvatar,Object.assign({},props));default:return react_1.default.createElement(default_avatar_1.DefaultAvatar,Object.assign({},props))}}exports.default=Avatar},27144:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DefaultAvatar=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),styles_module_scss_1=__importDefault(__webpack_require__(63552));function DefaultAvatar(_a){var{size=32,children,className}=_a,rest=__rest(_a,["size","children","className"]);return react_1.default.createElement("div",Object.assign({className:(0,classnames_1.default)(styles_module_scss_1.default.default,styles_module_scss_1.default.avatar,className),style:{width:`${size}px`,height:`${size}px`,fontSize:`${size*.35}px`,lineHeight:`${size}px`}},rest),"?",children)}exports.DefaultAvatar=DefaultAvatar},14452:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DefaultAvatar=exports.OrgAvatar=exports.UserAvatar=void 0,__exportStar(__webpack_require__(69124),exports);var user_avatar_1=__webpack_require__(18088);Object.defineProperty(exports,"UserAvatar",{enumerable:!0,get:function(){return user_avatar_1.UserAvatar}});var org_avatar_1=__webpack_require__(27636);Object.defineProperty(exports,"OrgAvatar",{enumerable:!0,get:function(){return org_avatar_1.OrgAvatar}});var default_avatar_1=__webpack_require__(27144);Object.defineProperty(exports,"DefaultAvatar",{enumerable:!0,get:function(){return default_avatar_1.DefaultAvatar}})},27636:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OrgAvatar=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),toolbox_url_add_avatar_query_params_1=__webpack_require__(66045),styles_module_scss_1=__importDefault(__webpack_require__(63552));function OrgAvatar(_a){var{account,size=32,imageSize=size,fontSize=Math.round(size*.4),className,imgClassName,children}=_a,rest=__rest(_a,["account","size","imageSize","fontSize","className","imgClassName","children"]);const{profileImage=""}=account,profileImageWithParams=profileImage&&profileImage.startsWith("blob:")?profileImage:(0,toolbox_url_add_avatar_query_params_1.addAvatarQueryParams)(profileImage,imageSize,styles_module_scss_1.default.defaultAvatarBgColor);return react_1.default.createElement("div",Object.assign({className:(0,classnames_1.default)(styles_module_scss_1.default.default,styles_module_scss_1.default.avatar,className),style:{width:`${size}px`,height:`${size}px`}},rest),profileImageWithParams&&react_1.default.createElement("img",{src:profileImageWithParams,className:(0,classnames_1.default)(styles_module_scss_1.default.avatarImg,profileImage.startsWith("blob:")&&styles_module_scss_1.default.blob,imgClassName)}),react_1.default.createElement("span",{className:styles_module_scss_1.default.defaultAvatar},react_1.default.createElement("i",{className:"bitcon-organization",style:{fontSize:`${fontSize}px`,lineHeight:`${size}px`}})),children)}exports.OrgAvatar=OrgAvatar},18088:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserAvatar=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),design_elements_icon_1=__webpack_require__(29284),toolbox_url_add_avatar_query_params_1=__webpack_require__(66045),toolbox_string_get_initials_1=__webpack_require__(85749),design_ui_styles_colors_by_letter_1=__webpack_require__(43754),design_ui_styles_ellipsis_1=__webpack_require__(2997),design_ui_tooltip_1=__webpack_require__(93976),styles_module_scss_1=__importDefault(__webpack_require__(63552));function UserAvatar(_a){var{account,size,imageSize=size,fontSize=Math.round(size*.4),className,imgClassName,showTooltip=!1,tooltipPlacement="bottom",children}=_a,rest=__rest(_a,["account","size","imageSize","fontSize","className","imgClassName","showTooltip","tooltipPlacement","children"]);const{profileImage="",name="",displayName=""}=account,firstLetter=name[0]||displayName[0],profileImageWithParams=profileImage&&profileImage.startsWith("blob:")?profileImage:(0,toolbox_url_add_avatar_query_params_1.addAvatarQueryParams)(profileImage,imageSize,styles_module_scss_1.default.defaultAvatarBgColor),colors=firstLetter&&design_ui_styles_colors_by_letter_1.letterBgColors[firstLetter.toLowerCase()],avatar=react_1.default.createElement("div",Object.assign({className:(0,classnames_1.default)(colors,styles_module_scss_1.default.avatar,className),style:{minWidth:`${size}px`,width:`${size}px`,height:`${size}px`}},rest),profileImageWithParams&&react_1.default.createElement("img",{src:profileImageWithParams,className:(0,classnames_1.default)(styles_module_scss_1.default.avatarImg,profileImage.startsWith("blob:")&&styles_module_scss_1.default.blob,imgClassName)}),(displayName||name)&&react_1.default.createElement("span",{className:styles_module_scss_1.default.letter,style:{fontSize:`${fontSize}px`,lineHeight:`${size}px`}},(0,toolbox_string_get_initials_1.getInitials)(displayName||name)),!displayName&&!name&&!profileImageWithParams&&!firstLetter&&react_1.default.createElement(design_elements_icon_1.Icon,{of:"solo-avatar",style:{fontSize:`${size}px`},className:(0,classnames_1.default)(styles_module_scss_1.default.avatarImg,styles_module_scss_1.default.soloAvatarIcon)}),children);return showTooltip?react_1.default.createElement(design_ui_tooltip_1.Tooltip,{placement:tooltipPlacement,content:react_1.default.createElement("div",{className:design_ui_styles_ellipsis_1.ellipsis},displayName?react_1.default.createElement(react_1.default.Fragment,null,displayName," (@",name,")"):react_1.default.createElement(react_1.default.Fragment,null,"@",name))},avatar):avatar}exports.UserAvatar=UserAvatar},59453:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimeAgo=void 0;var time_ago_1=__webpack_require__(78278);Object.defineProperty(exports,"TimeAgo",{enumerable:!0,get:function(){return time_ago_1.TimeAgo}})},78278:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimeAgo=void 0;const react_1=__importStar(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),base_ui_utils_time_ago_1=__importDefault(__webpack_require__(72149)),design_ui_tooltip_1=__webpack_require__(93976),time_ago_module_scss_1=__importDefault(__webpack_require__(93566));function TimeAgo(_a){var{date,tooltip,className}=_a,rest=__rest(_a,["date","tooltip","className"]);const[refreshIdx,forceUpdate]=(0,react_1.useReducer)(x=>x+1,0);(0,react_1.useEffect)(()=>{const tId=setInterval(()=>forceUpdate(),6e4);return()=>clearInterval(tId)},[]);const formatted=(0,react_1.useMemo)(()=>(0,base_ui_utils_time_ago_1.default)(date),[date,refreshIdx]);return(element=>tooltip===void 0?element:react_1.default.createElement(design_ui_tooltip_1.Tooltip,{className:time_ago_module_scss_1.default.dateTooltip,placement:"top",content:react_1.default.createElement("div",{className:time_ago_module_scss_1.default.dateTooltipContent},tooltip)},element))(react_1.default.createElement("span",Object.assign({},rest,{className:(0,classnames_1.default)(className)}),formatted))}exports.TimeAgo=TimeAgo},93976:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.tippy=exports.useSingleton=exports.TooltipMountPoint=exports.SingletonTooltipProvider=exports.useCtxTooltipInstance=exports.ProvideTooltipInstance=exports.Tooltip=void 0;var tooltip_1=__webpack_require__(34128);Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return tooltip_1.Tooltip}});var shared_instance_1=__webpack_require__(30003);Object.defineProperty(exports,"ProvideTooltipInstance",{enumerable:!0,get:function(){return shared_instance_1.ProvideTooltipInstance}}),Object.defineProperty(exports,"useCtxTooltipInstance",{enumerable:!0,get:function(){return shared_instance_1.useCtxTooltipInstance}});var singleton_instance_1=__webpack_require__(93052);Object.defineProperty(exports,"SingletonTooltipProvider",{enumerable:!0,get:function(){return singleton_instance_1.SingletonTooltipProvider}});var mount_point_1=__webpack_require__(18978);Object.defineProperty(exports,"TooltipMountPoint",{enumerable:!0,get:function(){return mount_point_1.TooltipMountPoint}});var react_1=__webpack_require__(33224);Object.defineProperty(exports,"useSingleton",{enumerable:!0,get:function(){return react_1.useSingleton}}),Object.defineProperty(exports,"tippy",{enumerable:!0,get:function(){return react_1.tippy}})},18978:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TooltipMountPoint=exports.getMountPoint=exports.mountId=void 0;const react_1=__importDefault(__webpack_require__(59496));exports.mountId="tooltip-mount-point";function getMountPoint(ref){return document.getElementById(exports.mountId)||ref.parentElement||document.body}exports.getMountPoint=getMountPoint;function TooltipMountPoint(){return react_1.default.createElement("div",{id:exports.mountId})}exports.TooltipMountPoint=TooltipMountPoint},30003:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useCtxTooltipInstance=exports.ProvideTooltipInstance=void 0;const react_1=__importStar(__webpack_require__(59496)),singletonContext=(0,react_1.createContext)(void 0);function ProvideTooltipInstance({value,children}){return react_1.default.createElement(singletonContext.Provider,{value},children)}exports.ProvideTooltipInstance=ProvideTooltipInstance;function useCtxTooltipInstance(){return(0,react_1.useContext)(singletonContext)}exports.useCtxTooltipInstance=useCtxTooltipInstance},93052:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonTooltipProvider=void 0;const react_1=__importDefault(__webpack_require__(59496)),react_2=__webpack_require__(33224),shared_instance_1=__webpack_require__(30003),tooltip_1=__webpack_require__(34128);function SingletonTooltipProvider(_a){var{children,disabled,overrides}=_a,rest=__rest(_a,["children","disabled","overrides"]);const[tooltipSource,tooltipTarget]=(0,react_2.useSingleton)({disabled,overrides});return react_1.default.createElement(react_1.default.Fragment,null,react_1.default.createElement(tooltip_1.Tooltip,Object.assign({},rest,{singleton:tooltipSource})),react_1.default.createElement(shared_instance_1.ProvideTooltipInstance,{value:tooltipTarget},children))}exports.SingletonTooltipProvider=SingletonTooltipProvider},34128:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tooltip=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),ui_foundation_ui_hooks_use_is_mobile_1=__webpack_require__(87082),base_ui_theme_dark_theme_1=__webpack_require__(12880),react_2=__importDefault(__webpack_require__(33224)),tippy_js_1=__webpack_require__(48199);__webpack_require__(94329),__webpack_require__(44712);const mount_point_1=__webpack_require__(18978),shared_instance_1=__webpack_require__(30003);__webpack_require__(88022);const THEME="teambit",popperOptions={modifiers:[{name:"arrow",options:{padding:5}}]};function Tooltip(_a){var{children,breakline,singleton,visibleOnMobile,className}=_a,rest=__rest(_a,["children","breakline","singleton","visibleOnMobile","className"]);const isMobile=(0,ui_foundation_ui_hooks_use_is_mobile_1.useIsMobile)();if(!visibleOnMobile&&isMobile)return react_1.default.createElement(react_1.default.Fragment,null,children);const ctxInstance=(0,shared_instance_1.useCtxTooltipInstance)(),singletonInstance=singleton||ctxInstance,child=typeof children=="string"?react_1.default.createElement("span",null,children):children;return react_1.default.createElement(react_2.default,Object.assign({arrow:tippy_js_1.roundArrow,className:(0,classnames_1.default)(base_ui_theme_dark_theme_1.darkMode,breakline&&"tippy-breakLine",className),theme:THEME,interactive:!0,appendTo:mount_point_1.getMountPoint,popperOptions},rest,{singleton:singletonInstance}),child)}exports.Tooltip=Tooltip},7122:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useDocs=exports.docsFields=void 0;const client_1=__webpack_require__(53574);exports.docsFields=(0,client_1.gql)`
|
539
|
+
`},21268:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Filters",{enumerable:!0,get:function(){return _useComponent().Filters}}),Object.defineProperty(exports,"UseComponentType",{enumerable:!0,get:function(){return _useComponent().UseComponentType}}),exports.useComponent=useComponent;function _uiFoundationUiReactRouter(){const data=__webpack_require__(46718);return _uiFoundationUiReactRouter=function(){return data},data}function _useComponentQuery(){const data=__webpack_require__(62589);return _useComponentQuery=function(){return data},data}function _useComponent(){const data=__webpack_require__(48166);return _useComponent=function(){return data},data}function useComponent(host,id,options){const query=(0,_uiFoundationUiReactRouter().useQuery)(),{version,logFilters,customUseComponent,skip}=options||{},componentVersion=(version||query.get("version"))??void 0,componentIdStr=id&&withVersion(id,componentVersion);return(customUseComponent||_useComponentQuery().useComponentQuery)(componentIdStr||"",host,logFilters,skip||!id)}function withVersion(id,version){return!version||id.includes("@")?id:`${id}@${version}`}},48166:()=>{"use strict"},12645:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getOffsetValue=getOffsetValue;function getOffsetValue(offset,limit,backwards=!1){if(offset!==void 0)return backwards?-(offset+limit):offset;if(limit!==void 0)return 0}},25408:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PreviewSkeleton=exports.CompositionCardSkeleton=void 0;const react_1=__importDefault(__webpack_require__(59496)),base_ui_loaders_skeleton_1=__webpack_require__(20298),composition_card_skeleton_module_scss_1=__importDefault(__webpack_require__(62342));function CompositionCardSkeleton(){return react_1.default.createElement("div",{className:composition_card_skeleton_module_scss_1.default.compositionCardSkeleton},react_1.default.createElement(PreviewSkeleton,null),react_1.default.createElement("div",{className:composition_card_skeleton_module_scss_1.default.bottom},react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"104px"})))}exports.CompositionCardSkeleton=CompositionCardSkeleton;function PreviewSkeleton(){return react_1.default.createElement("div",{className:composition_card_skeleton_module_scss_1.default.preview},react_1.default.createElement(base_ui_loaders_skeleton_1.BlockSkeleton,{lines:2,className:composition_card_skeleton_module_scss_1.default.block}),react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"208px"}),react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"152px"}),react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"88px"}))}exports.PreviewSkeleton=PreviewSkeleton},78647:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PreviewSkeleton=exports.CompositionCardSkeleton=void 0;var composition_card_skeleton_1=__webpack_require__(25408);Object.defineProperty(exports,"CompositionCardSkeleton",{enumerable:!0,get:function(){return composition_card_skeleton_1.CompositionCardSkeleton}}),Object.defineProperty(exports,"PreviewSkeleton",{enumerable:!0,get:function(){return composition_card_skeleton_1.PreviewSkeleton}})},94075:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionCard=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),evangelist_elements_icon_1=__webpack_require__(86144),compositions_1=__webpack_require__(32552),design_ui_styles_ellipsis_1=__webpack_require__(2997),composition_card_module_scss_1=__importDefault(__webpack_require__(6998));exports.CompositionCard=react_1.default.memo(_CompositionCard);function _CompositionCard(_a){var{composition,component,className,openCompositionLink,previewClass}=_a,rest=__rest(_a,["composition","component","className","openCompositionLink","previewClass"]);const Composition=react_1.default.useMemo(()=>react_1.default.createElement(compositions_1.ComponentComposition,{disableScroll:!0,className:previewClass,includeEnv:!1,loading:"lazy",composition,component,viewport:1280,previewName:"compositions"}),[composition.identifier,component.id.toString(),previewClass]);return react_1.default.createElement("div",Object.assign({},rest,{key:composition.identifier,className:(0,classnames_1.default)(composition_card_module_scss_1.default.compositionCard,className)}),react_1.default.createElement("div",{className:composition_card_module_scss_1.default.compositionPreview},Composition),react_1.default.createElement("div",{className:composition_card_module_scss_1.default.bottom},react_1.default.createElement("span",{className:(0,classnames_1.default)(design_ui_styles_ellipsis_1.ellipsis,composition_card_module_scss_1.default.displayName)},composition.displayName),openCompositionLink&&react_1.default.createElement("a",{className:composition_card_module_scss_1.default.link,target:"_blank",rel:"noopener noreferrer",href:openCompositionLink},react_1.default.createElement(evangelist_elements_icon_1.Icon,{className:composition_card_module_scss_1.default.icon,of:"open-tab"}))))}},75797:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionCardSkeleton=exports.CompositionCard=void 0;var composition_card_1=__webpack_require__(94075);Object.defineProperty(exports,"CompositionCard",{enumerable:!0,get:function(){return composition_card_1.CompositionCard}});var composition_card_skeleton_1=__webpack_require__(78647);Object.defineProperty(exports,"CompositionCardSkeleton",{enumerable:!0,get:function(){return composition_card_skeleton_1.CompositionCardSkeleton}})},4405:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.humanizeCompositionId=void 0;const humanize_string_1=__importDefault(__webpack_require__(28583));function humanizeCompositionId(rawId){return(0,humanize_string_1.default)(rawId)}exports.humanizeCompositionId=humanizeCompositionId},91888:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.humanizeCompositionId=void 0;var humanize_1=__webpack_require__(4405);Object.defineProperty(exports,"humanizeCompositionId",{enumerable:!0,get:function(){return humanize_1.humanizeCompositionId}})},94659:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionGallerySkeleton=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),base_ui_loaders_skeleton_1=__webpack_require__(20298),composition_card_1=__webpack_require__(75797),composition_gallery_skeleton_module_scss_1=__importDefault(__webpack_require__(9092));function CompositionGallerySkeleton(_a){var{compositionsLength,className}=_a,rest=__rest(_a,["compositionsLength","className"]);const length=Array.from(Array(compositionsLength));return react_1.default.createElement("div",Object.assign({},rest,{className:(0,classnames_1.default)(composition_gallery_skeleton_module_scss_1.default.compositionGallerySkeleton,className)}),react_1.default.createElement(base_ui_loaders_skeleton_1.LineSkeleton,{width:"100px",className:composition_gallery_skeleton_module_scss_1.default.title}),react_1.default.createElement("div",{className:(0,classnames_1.default)(composition_gallery_skeleton_module_scss_1.default.compositionGalleryGrid)},length.map((_,index)=>react_1.default.createElement(composition_card_1.CompositionCardSkeleton,{key:`comp-card-skeleton-${index}`}))))}exports.CompositionGallerySkeleton=CompositionGallerySkeleton},67343:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionGallerySkeleton=void 0;var composition_gallery_skeleton_1=__webpack_require__(94659);Object.defineProperty(exports,"CompositionGallerySkeleton",{enumerable:!0,get:function(){return composition_gallery_skeleton_1.CompositionGallerySkeleton}})},94478:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionGallery=void 0;const react_1=__importDefault(__webpack_require__(59496)),design_elements_icon_1=__webpack_require__(29284),documenter_ui_linked_heading_1=__webpack_require__(19058),base_react_navigation_link_1=__webpack_require__(6231),composition_card_1=__webpack_require__(75797),composition_gallery_module_scss_1=__importDefault(__webpack_require__(52174));function CompositionGallery({component}){const navigate=(0,base_react_navigation_link_1.useNavigate)();return component.compositions.length>0?react_1.default.createElement("div",{className:composition_gallery_module_scss_1.default.compositionGallery},react_1.default.createElement(documenter_ui_linked_heading_1.LinkedHeading,{size:"sm",className:composition_gallery_module_scss_1.default.title},react_1.default.createElement(design_elements_icon_1.Icon,{of:"eye"})," ",react_1.default.createElement("span",null,"PREVIEW")),react_1.default.createElement("div",{className:composition_gallery_module_scss_1.default.carousel},component.compositions.map(composition=>react_1.default.createElement(composition_card_1.CompositionCard,{key:composition.identifier.toLowerCase(),onClick:()=>navigate(`~compositions/${composition.identifier.toLowerCase()}`),className:composition_gallery_module_scss_1.default.compositionGalleryCard,previewClass:composition_gallery_module_scss_1.default.preview,composition,component})))):null}exports.CompositionGallery=CompositionGallery},10726:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionGallerySkeleton=exports.CompositionGallery=void 0;var composition_gallery_1=__webpack_require__(94478);Object.defineProperty(exports,"CompositionGallery",{enumerable:!0,get:function(){return composition_gallery_1.CompositionGallery}});var composition_gallery_skeleton_1=__webpack_require__(67343);Object.defineProperty(exports,"CompositionGallerySkeleton",{enumerable:!0,get:function(){return composition_gallery_skeleton_1.CompositionGallerySkeleton}})},39708:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Composition=void 0;function _compositionsModel(){const data=__webpack_require__(91888);return _compositionsModel=function(){return data},data}class Composition{constructor(identifier,filepath,_displayName){this.identifier=identifier,this.filepath=filepath,this._displayName=_displayName}get displayName(){return this._displayName||(0,_compositionsModel().humanizeCompositionId)(this.identifier)}toObject(){return{identifier:this.identifier,filepath:this.filepath,displayName:this._displayName}}toBrowserMetaDataObject(){return{identifier:this.identifier,displayName:this._displayName}}static fromArray(compositions){return compositions.map(composition=>new Composition(composition.identifier,composition.filepath,composition.displayName))}}exports.Composition=Composition},82704:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionContent=CompositionContent,exports.Compositions=Compositions;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}function _lodash(){const data=_interopRequireDefault(__webpack_require__(40733));return _lodash=function(){return data},data}function _queryString(){const data=_interopRequireDefault(__webpack_require__(42546));return _queryString=function(){return data},data}function _documenterTheme(){const data=__webpack_require__(18170);return _documenterTheme=function(){return data},data}function _baseUiSurfacesSplitPane(){const data=__webpack_require__(4792);return _baseUiSurfacesSplitPane=function(){return data},data}function _baseUiSurfacesSplitPane2(){const data=__webpack_require__(56007);return _baseUiSurfacesSplitPane2=function(){return data},data}function _component(){const data=__webpack_require__(68211);return _component=function(){return data},data}function _documenterUi(){const data=__webpack_require__(3405);return _documenterUi=function(){return data},data}function _panels(){const data=__webpack_require__(52515);return _panels=function(){return data},data}function _docsUiQueries(){const data=__webpack_require__(82718);return _docsUiQueries=function(){return data},data}function _uiFoundationUiButtons(){const data=__webpack_require__(32098);return _uiFoundationUiButtons=function(){return data},data}function _designUi(){const data=__webpack_require__(89673);return _designUi=function(){return data},data}function _previewUi(){const data=__webpack_require__(27699);return _previewUi=function(){return data},data}function _uiFoundationUiHooks(){const data=__webpack_require__(87082);return _uiFoundationUiHooks=function(){return data},data}function _compositionsUi(){const data=__webpack_require__(10421);return _compositionsUi=function(){return data},data}function _compositionsUiHooks(){const data=__webpack_require__(77972);return _compositionsUiHooks=function(){return data},data}function _mdxUi(){const data=__webpack_require__(32363);return _mdxUi=function(){return data},data}function _designUi2(){const data=__webpack_require__(12563);return _designUi2=function(){return data},data}function _documenterUi2(){const data=__webpack_require__(37742);return _documenterUi2=function(){return data},data}function _designUi3(){const data=__webpack_require__(35682);return _designUi3=function(){return data},data}function _baseReactNavigation(){const data=__webpack_require__(6231);return _baseReactNavigation=function(){return data},data}function _designUiInput(){const data=__webpack_require__(11276);return _designUiInput=function(){return data},data}function _designUiSurfaces(){const data=__webpack_require__(56493);return _designUiSurfaces=function(){return data},data}function _designUi4(){const data=__webpack_require__(93976);return _designUi4=function(){return data},data}function _compositionsModule(){const data=_interopRequireDefault(__webpack_require__(94042));return _compositionsModule=function(){return data},data}function _ui(){const data=__webpack_require__(29066);return _ui=function(){return data},data}function _compositionsPanel(){const data=__webpack_require__(14427);return _compositionsPanel=function(){return data},data}const _excluded=["component","selected","queryParams","emptyState"];function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}const Link=_baseReactNavigation().Link;function Compositions({menuBarWidgets,emptyState}){const component=(0,_react().useContext)(_component().ComponentContext),[searchParams]=(0,_reactRouterDom().useSearchParams)(),params=(0,_reactRouterDom().useParams)(),versionFromQueryParams=searchParams.get("version"),navigate=(0,_baseReactNavigation().useNavigate)(),location=(0,_baseReactNavigation().useLocation)(),currentCompositionName=params["*"],currentComposition=component.compositions.find(composition=>composition.identifier.toLowerCase()===currentCompositionName)||(0,_lodash().default)(component.compositions),selectedRef=(0,_react().useRef)(currentComposition);selectedRef.current=currentComposition;const properties=(0,_docsUiQueries().useDocs)(component.id),showSidebar=!(0,_uiFoundationUiHooks().useIsMobile)()&&component.compositions.length>0,[isSidebarOpen,setSidebarOpenness]=(0,_react().useState)(showSidebar),sidebarOpenness=isSidebarOpen?_baseUiSurfacesSplitPane().Layout.row:_baseUiSurfacesSplitPane().Layout.left,compositionUrl=(0,_previewUi().toPreviewUrl)(component,"compositions"),isScaling=component?.preview?.isScaling,includesEnvTemplates=component?.preview?.includesEnvTemplate,useNameParam=component?.preview?.useNameParam,compositionIdentifierParam=useNameParam||isScaling&&includesEnvTemplates===!1?`name=${currentComposition?.identifier}`:currentComposition?.identifier,currentCompositionFullUrl=(0,_previewUi().toPreviewUrl)(component,"compositions",compositionIdentifierParam),[compositionParams,setCompositionParams]=(0,_react().useState)({fullscreen:!0}),queryParams=(0,_react().useMemo)(()=>_queryString().default.stringify(compositionParams),[compositionParams]);return(0,_react().useEffect)(()=>setSidebarOpenness(showSidebar),[showSidebar]),_react().default.createElement(_compositionsUiHooks().CompositionContextProvider,{queryParams:compositionParams,setQueryParams:setCompositionParams},_react().default.createElement(_baseUiSurfacesSplitPane().SplitPane,{layout:sidebarOpenness,size:"85%",className:_compositionsModule().default.compositionsPage},_react().default.createElement(_baseUiSurfacesSplitPane().Pane,{className:_compositionsModule().default.left},_react().default.createElement(_compositionsUi().CompositionsMenuBar,{menuBarWidgets,className:_compositionsModule().default.menuBar},_react().default.createElement(_designUi4().Tooltip,{content:"Open in new tab",placement:"right"},_react().default.createElement(Link,{external:!0,href:currentCompositionFullUrl,className:_compositionsModule().default.openInNewTab},_react().default.createElement(_designUiInput().OptionButton,{icon:"open-tab"})))),_react().default.createElement(CompositionContent,{className:_compositionsModule().default.compositionPanel,emptyState,component,selected:currentComposition,queryParams})),_react().default.createElement(_baseUiSurfacesSplitPane2().HoverSplitter,{className:_compositionsModule().default.splitter},_react().default.createElement(_uiFoundationUiButtons().Collapser,{placement:"left",isOpen:isSidebarOpen,onMouseDown:e=>e.stopPropagation(),onClick:()=>setSidebarOpenness(x=>!x),tooltipContent:`${isSidebarOpen?"Hide":"Show"} side compositions`,className:_compositionsModule().default.collapser})),_react().default.createElement(_baseUiSurfacesSplitPane().Pane,{className:_compositionsModule().default.right},_react().default.createElement(_documenterTheme().ThemeContext,null,_react().default.createElement(_panels().TabContainer,{className:_compositionsModule().default.tabsContainer},_react().default.createElement(_panels().TabList,{className:_compositionsModule().default.tabs},_react().default.createElement(_panels().Tab,null,"compositions"),_react().default.createElement(_panels().Tab,null,"properties")),_react().default.createElement(_panels().TabPanel,{className:_compositionsModule().default.tabContent},_react().default.createElement(_compositionsPanel().CompositionsPanel,{isScaling,useNameParam,includesEnvTemplate:component.preview?.includesEnvTemplate,onSelectComposition:composition=>{if(!currentComposition||!location)return;const selectedCompositionFromUrl=params["*"],pathSegments=location.pathname.split("/").filter(x=>x);selectedCompositionFromUrl?pathSegments[pathSegments.length-1]=composition.identifier.toLowerCase():pathSegments.push(composition.identifier.toLowerCase());const urlParams=new URLSearchParams(searchParams);versionFromQueryParams&&urlParams.set("version",versionFromQueryParams);const newPath=pathSegments.join("/");navigate(`/${newPath}?${urlParams.toString()}`)},url:compositionUrl,compositions:component.compositions,active:currentComposition})),_react().default.createElement(_panels().TabPanel,{className:_compositionsModule().default.tabContent},properties&&properties.length>0?_react().default.createElement(_documenterUi().PropTable,{rows:properties,showListView:!0}):_react().default.createElement("div",null)))))))}function CompositionContent(_ref){let{component,selected,queryParams,emptyState}=_ref,componentCompositionProps=_objectWithoutProperties(_ref,_excluded);const env=component.environment?.id,EmptyStateTemplate=emptyState?.get(env||"");return component.compositions.length===0&&component.host==="teambit.workspace/workspace"&&EmptyStateTemplate?_react().default.createElement("div",{className:_compositionsModule().default.noCompositionsPage},_react().default.createElement("div",null,_react().default.createElement(_documenterUi2().H1,{className:_compositionsModule().default.title},"Compositions"),_react().default.createElement(_designUi2().Separator,{isPresentational:!0,className:_compositionsModule().default.separator}),_react().default.createElement(_designUi3().AlertCard,{level:"info",title:"There are no compositions for this Component. Learn how to add compositions:"},_react().default.createElement(_mdxUi().MDXLayout,null,_react().default.createElement(EmptyStateTemplate,null))))):component?.buildStatus==="pending"&&component?.host==="teambit.scope/scope"?_react().default.createElement(_designUiSurfaces().StatusMessageCard,{className:_compositionsModule().default.buildStatusMessage,status:"PROCESSING",title:"component preview pending"},"this might take some time"):component?.buildStatus==="failed"&&component?.host==="teambit.scope/scope"?_react().default.createElement(_designUiSurfaces().StatusMessageCard,{className:_compositionsModule().default.buildStatusMessage,status:"FAILURE",title:"failed to get component preview "}):component.compositions.length===0?_react().default.createElement(_designUi().EmptyBox,{title:"There are no compositions for this component.",linkText:"Learn how to create compositions",link:"https://bit.dev/reference/dev-services-overview/compositions/compositions-overview"}):_react().default.createElement(_ui().ComponentComposition,_extends({className:_compositionsModule().default.compositionsIframe,viewport:null,component,forceHeight:"100%",composition:selected,fullContentHeight:!0,pubsub:!0,queryParams},componentCompositionProps))}},32552:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentComposition",{enumerable:!0,get:function(){return _ui().ComponentComposition}}),Object.defineProperty(exports,"Composition",{enumerable:!0,get:function(){return _composition().Composition}}),Object.defineProperty(exports,"CompositionContent",{enumerable:!0,get:function(){return _compositions2().CompositionContent}}),Object.defineProperty(exports,"CompositionsAspect",{enumerable:!0,get:function(){return _compositions().CompositionsAspect}}),exports.default=void 0;function _compositions(){const data=__webpack_require__(36717);return _compositions=function(){return data},data}function _composition(){const data=__webpack_require__(39708);return _composition=function(){return data},data}function _compositions2(){const data=__webpack_require__(82704);return _compositions2=function(){return data},data}function _ui(){const data=__webpack_require__(29066);return _ui=function(){return data},data}var _default=exports.default=_compositions().CompositionsAspect},23700:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentComposition=ComponentComposition;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _previewUi(){const data=__webpack_require__(27699);return _previewUi=function(){return data},data}const _excluded=["composition","component","queryParams"];function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}function ComponentComposition(_ref){let{composition,component,queryParams=[]}=_ref,rest=_objectWithoutProperties(_ref,_excluded);const includesEnvTemplate=component.preview?.includesEnvTemplate,isScaling=component.preview?.isScaling,shouldAddNameParam=component.preview?.useNameParam||isScaling&&includesEnvTemplate===!1,compositionParams=(0,_react().useMemo)(()=>(composition?[shouldAddNameParam?`name=${composition.identifier}`:composition.identifier]:[]).concat(queryParams),[composition?.identifier,queryParams]);return _react().default.createElement(_previewUi().ComponentPreview,_extends({},rest,{component,style:{width:"100%",height:"100%"},previewName:"compositions",queryParams:compositionParams}))}},14427:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionsPanel=CompositionsPanel;function _evangelistElements(){const data=__webpack_require__(86144);return _evangelistElements=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _reactRouterDom(){const data=__webpack_require__(12294);return _reactRouterDom=function(){return data},data}function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _uiFoundationUi(){const data=__webpack_require__(13202);return _uiFoundationUi=function(){return data},data}function _designUi(){const data=__webpack_require__(93976);return _designUi=function(){return data},data}function _baseReactNavigation(){const data=__webpack_require__(6231);return _baseReactNavigation=function(){return data},data}function _compositionsPanelModule(){const data=_interopRequireDefault(__webpack_require__(29217));return _compositionsPanelModule=function(){return data},data}const _excluded=["url","compositions","isScaling","onSelectComposition","active","includesEnvTemplate","useNameParam","className"];function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}function CompositionsPanel(_ref){let{url,compositions,isScaling,onSelectComposition:onSelect,active,includesEnvTemplate,useNameParam,className}=_ref,rest=_objectWithoutProperties(_ref,_excluded);const shouldAddNameParam=useNameParam||isScaling&&includesEnvTemplate===!1,handleSelect=(0,_react().useCallback)(selected=>{onSelect&&onSelect(selected)},[onSelect]),location=(0,_baseReactNavigation().useLocation)(),[searchParams]=(0,_reactRouterDom().useSearchParams)(),versionFromQueryParams=searchParams.get("version"),navigate=(0,_baseReactNavigation().useNavigate)(),onCompositionCodeClicked=(0,_react().useCallback)(composition=>e=>{e.preventDefault();const queryParams=new URLSearchParams;versionFromQueryParams&&queryParams.set("version",versionFromQueryParams);const basePath=location?.pathname.split("/~compositions")[0];navigate(`${basePath}/~code/${composition.filepath}?${queryParams.toString()}#search=${composition.identifier}`)},[location?.pathname,versionFromQueryParams]);return _react().default.createElement("ul",_extends({},rest,{className:(0,_classnames().default)(className)}),compositions.map(composition=>{const href=shouldAddNameParam?`${url}&name=${composition.identifier}`:`${url}&${composition.identifier}`;return _react().default.createElement("li",{key:composition.identifier,className:(0,_classnames().default)(_compositionsPanelModule().default.linkWrapper,composition===active&&_compositionsPanelModule().default.active)},_react().default.createElement("a",{className:_compositionsPanelModule().default.panelLink,onClick:()=>handleSelect(composition)},_react().default.createElement("span",{className:_compositionsPanelModule().default.box}),_react().default.createElement("span",{className:_compositionsPanelModule().default.name},composition.displayName)),_react().default.createElement("div",{className:_compositionsPanelModule().default.right},_react().default.createElement(_uiFoundationUi().MenuWidgetIcon,{className:_compositionsPanelModule().default.codeLink,icon:"Code",tooltipContent:"Code",onClick:onCompositionCodeClicked(composition)}),_react().default.createElement(_designUi().Tooltip,{content:"Open in new tab",placement:"bottom"},_react().default.createElement("a",{className:_compositionsPanelModule().default.panelLink,target:"_blank",rel:"noopener noreferrer",href},_react().default.createElement(_evangelistElements().Icon,{className:_compositionsPanelModule().default.icon,of:"open-tab"})))))}))}},29066:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ComponentComposition",{enumerable:!0,get:function(){return _compositionPreview().ComponentComposition}});function _compositionPreview(){const data=__webpack_require__(23700);return _compositionPreview=function(){return data},data}},69124:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AccountTypes=void 0;const react_1=__importDefault(__webpack_require__(59496)),default_avatar_1=__webpack_require__(27144),org_avatar_1=__webpack_require__(27636),user_avatar_1=__webpack_require__(18088);var AccountTypes;(function(AccountTypes2){AccountTypes2.org="organization",AccountTypes2.user="user",AccountTypes2.default="default"})(AccountTypes||(exports.AccountTypes=AccountTypes={}));function Avatar(props){const{account}=props;switch(account.accountType){case AccountTypes.user:return react_1.default.createElement(user_avatar_1.UserAvatar,Object.assign({},props));case AccountTypes.org:return react_1.default.createElement(org_avatar_1.OrgAvatar,Object.assign({},props));default:return react_1.default.createElement(default_avatar_1.DefaultAvatar,Object.assign({},props))}}exports.default=Avatar},27144:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DefaultAvatar=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),styles_module_scss_1=__importDefault(__webpack_require__(63552));function DefaultAvatar(_a){var{size=32,children,className}=_a,rest=__rest(_a,["size","children","className"]);return react_1.default.createElement("div",Object.assign({className:(0,classnames_1.default)(styles_module_scss_1.default.default,styles_module_scss_1.default.avatar,className),style:{width:`${size}px`,height:`${size}px`,fontSize:`${size*.35}px`,lineHeight:`${size}px`}},rest),"?",children)}exports.DefaultAvatar=DefaultAvatar},14452:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DefaultAvatar=exports.OrgAvatar=exports.UserAvatar=void 0,__exportStar(__webpack_require__(69124),exports);var user_avatar_1=__webpack_require__(18088);Object.defineProperty(exports,"UserAvatar",{enumerable:!0,get:function(){return user_avatar_1.UserAvatar}});var org_avatar_1=__webpack_require__(27636);Object.defineProperty(exports,"OrgAvatar",{enumerable:!0,get:function(){return org_avatar_1.OrgAvatar}});var default_avatar_1=__webpack_require__(27144);Object.defineProperty(exports,"DefaultAvatar",{enumerable:!0,get:function(){return default_avatar_1.DefaultAvatar}})},27636:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OrgAvatar=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),toolbox_url_add_avatar_query_params_1=__webpack_require__(66045),styles_module_scss_1=__importDefault(__webpack_require__(63552));function OrgAvatar(_a){var{account,size=32,imageSize=size,fontSize=Math.round(size*.4),className,imgClassName,children}=_a,rest=__rest(_a,["account","size","imageSize","fontSize","className","imgClassName","children"]);const{profileImage=""}=account,profileImageWithParams=profileImage&&profileImage.startsWith("blob:")?profileImage:(0,toolbox_url_add_avatar_query_params_1.addAvatarQueryParams)(profileImage,imageSize,styles_module_scss_1.default.defaultAvatarBgColor);return react_1.default.createElement("div",Object.assign({className:(0,classnames_1.default)(styles_module_scss_1.default.default,styles_module_scss_1.default.avatar,className),style:{width:`${size}px`,height:`${size}px`}},rest),profileImageWithParams&&react_1.default.createElement("img",{src:profileImageWithParams,className:(0,classnames_1.default)(styles_module_scss_1.default.avatarImg,profileImage.startsWith("blob:")&&styles_module_scss_1.default.blob,imgClassName)}),react_1.default.createElement("span",{className:styles_module_scss_1.default.defaultAvatar},react_1.default.createElement("i",{className:"bitcon-organization",style:{fontSize:`${fontSize}px`,lineHeight:`${size}px`}})),children)}exports.OrgAvatar=OrgAvatar},18088:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserAvatar=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),design_elements_icon_1=__webpack_require__(29284),toolbox_url_add_avatar_query_params_1=__webpack_require__(66045),toolbox_string_get_initials_1=__webpack_require__(85749),design_ui_styles_colors_by_letter_1=__webpack_require__(43754),design_ui_styles_ellipsis_1=__webpack_require__(2997),design_ui_tooltip_1=__webpack_require__(93976),styles_module_scss_1=__importDefault(__webpack_require__(63552));function UserAvatar(_a){var{account,size,imageSize=size,fontSize=Math.round(size*.4),className,imgClassName,showTooltip=!1,tooltipPlacement="bottom",children}=_a,rest=__rest(_a,["account","size","imageSize","fontSize","className","imgClassName","showTooltip","tooltipPlacement","children"]);const{profileImage="",name="",displayName=""}=account,firstLetter=name[0]||displayName[0],profileImageWithParams=profileImage&&profileImage.startsWith("blob:")?profileImage:(0,toolbox_url_add_avatar_query_params_1.addAvatarQueryParams)(profileImage,imageSize,styles_module_scss_1.default.defaultAvatarBgColor),colors=firstLetter&&design_ui_styles_colors_by_letter_1.letterBgColors[firstLetter.toLowerCase()],avatar=react_1.default.createElement("div",Object.assign({className:(0,classnames_1.default)(colors,styles_module_scss_1.default.avatar,className),style:{minWidth:`${size}px`,width:`${size}px`,height:`${size}px`}},rest),profileImageWithParams&&react_1.default.createElement("img",{src:profileImageWithParams,className:(0,classnames_1.default)(styles_module_scss_1.default.avatarImg,profileImage.startsWith("blob:")&&styles_module_scss_1.default.blob,imgClassName)}),(displayName||name)&&react_1.default.createElement("span",{className:styles_module_scss_1.default.letter,style:{fontSize:`${fontSize}px`,lineHeight:`${size}px`}},(0,toolbox_string_get_initials_1.getInitials)(displayName||name)),!displayName&&!name&&!profileImageWithParams&&!firstLetter&&react_1.default.createElement(design_elements_icon_1.Icon,{of:"solo-avatar",style:{fontSize:`${size}px`},className:(0,classnames_1.default)(styles_module_scss_1.default.avatarImg,styles_module_scss_1.default.soloAvatarIcon)}),children);return showTooltip?react_1.default.createElement(design_ui_tooltip_1.Tooltip,{placement:tooltipPlacement,content:react_1.default.createElement("div",{className:design_ui_styles_ellipsis_1.ellipsis},displayName?react_1.default.createElement(react_1.default.Fragment,null,displayName," (@",name,")"):react_1.default.createElement(react_1.default.Fragment,null,"@",name))},avatar):avatar}exports.UserAvatar=UserAvatar},59453:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimeAgo=void 0;var time_ago_1=__webpack_require__(78278);Object.defineProperty(exports,"TimeAgo",{enumerable:!0,get:function(){return time_ago_1.TimeAgo}})},78278:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimeAgo=void 0;const react_1=__importStar(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),base_ui_utils_time_ago_1=__importDefault(__webpack_require__(72149)),design_ui_tooltip_1=__webpack_require__(93976),time_ago_module_scss_1=__importDefault(__webpack_require__(93566));function TimeAgo(_a){var{date,tooltip,className}=_a,rest=__rest(_a,["date","tooltip","className"]);const[refreshIdx,forceUpdate]=(0,react_1.useReducer)(x=>x+1,0);(0,react_1.useEffect)(()=>{const tId=setInterval(()=>forceUpdate(),6e4);return()=>clearInterval(tId)},[]);const formatted=(0,react_1.useMemo)(()=>(0,base_ui_utils_time_ago_1.default)(date),[date,refreshIdx]);return(element=>tooltip===void 0?element:react_1.default.createElement(design_ui_tooltip_1.Tooltip,{className:time_ago_module_scss_1.default.dateTooltip,placement:"top",content:react_1.default.createElement("div",{className:time_ago_module_scss_1.default.dateTooltipContent},tooltip)},element))(react_1.default.createElement("span",Object.assign({},rest,{className:(0,classnames_1.default)(className)}),formatted))}exports.TimeAgo=TimeAgo},93976:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.tippy=exports.useSingleton=exports.TooltipMountPoint=exports.SingletonTooltipProvider=exports.useCtxTooltipInstance=exports.ProvideTooltipInstance=exports.Tooltip=void 0;var tooltip_1=__webpack_require__(34128);Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return tooltip_1.Tooltip}});var shared_instance_1=__webpack_require__(30003);Object.defineProperty(exports,"ProvideTooltipInstance",{enumerable:!0,get:function(){return shared_instance_1.ProvideTooltipInstance}}),Object.defineProperty(exports,"useCtxTooltipInstance",{enumerable:!0,get:function(){return shared_instance_1.useCtxTooltipInstance}});var singleton_instance_1=__webpack_require__(93052);Object.defineProperty(exports,"SingletonTooltipProvider",{enumerable:!0,get:function(){return singleton_instance_1.SingletonTooltipProvider}});var mount_point_1=__webpack_require__(18978);Object.defineProperty(exports,"TooltipMountPoint",{enumerable:!0,get:function(){return mount_point_1.TooltipMountPoint}});var react_1=__webpack_require__(33224);Object.defineProperty(exports,"useSingleton",{enumerable:!0,get:function(){return react_1.useSingleton}}),Object.defineProperty(exports,"tippy",{enumerable:!0,get:function(){return react_1.tippy}})},18978:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TooltipMountPoint=exports.getMountPoint=exports.mountId=void 0;const react_1=__importDefault(__webpack_require__(59496));exports.mountId="tooltip-mount-point";function getMountPoint(ref){return document.getElementById(exports.mountId)||ref.parentElement||document.body}exports.getMountPoint=getMountPoint;function TooltipMountPoint(){return react_1.default.createElement("div",{id:exports.mountId})}exports.TooltipMountPoint=TooltipMountPoint},30003:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useCtxTooltipInstance=exports.ProvideTooltipInstance=void 0;const react_1=__importStar(__webpack_require__(59496)),singletonContext=(0,react_1.createContext)(void 0);function ProvideTooltipInstance({value,children}){return react_1.default.createElement(singletonContext.Provider,{value},children)}exports.ProvideTooltipInstance=ProvideTooltipInstance;function useCtxTooltipInstance(){return(0,react_1.useContext)(singletonContext)}exports.useCtxTooltipInstance=useCtxTooltipInstance},93052:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonTooltipProvider=void 0;const react_1=__importDefault(__webpack_require__(59496)),react_2=__webpack_require__(33224),shared_instance_1=__webpack_require__(30003),tooltip_1=__webpack_require__(34128);function SingletonTooltipProvider(_a){var{children,disabled,overrides}=_a,rest=__rest(_a,["children","disabled","overrides"]);const[tooltipSource,tooltipTarget]=(0,react_2.useSingleton)({disabled,overrides});return react_1.default.createElement(react_1.default.Fragment,null,react_1.default.createElement(tooltip_1.Tooltip,Object.assign({},rest,{singleton:tooltipSource})),react_1.default.createElement(shared_instance_1.ProvideTooltipInstance,{value:tooltipTarget},children))}exports.SingletonTooltipProvider=SingletonTooltipProvider},34128:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tooltip=void 0;const react_1=__importDefault(__webpack_require__(59496)),classnames_1=__importDefault(__webpack_require__(97754)),ui_foundation_ui_hooks_use_is_mobile_1=__webpack_require__(87082),base_ui_theme_dark_theme_1=__webpack_require__(12880),react_2=__importDefault(__webpack_require__(33224)),tippy_js_1=__webpack_require__(48199);__webpack_require__(94329),__webpack_require__(44712);const mount_point_1=__webpack_require__(18978),shared_instance_1=__webpack_require__(30003);__webpack_require__(88022);const THEME="teambit",popperOptions={modifiers:[{name:"arrow",options:{padding:5}}]};function Tooltip(_a){var{children,breakline,singleton,visibleOnMobile,className}=_a,rest=__rest(_a,["children","breakline","singleton","visibleOnMobile","className"]);const isMobile=(0,ui_foundation_ui_hooks_use_is_mobile_1.useIsMobile)();if(!visibleOnMobile&&isMobile)return react_1.default.createElement(react_1.default.Fragment,null,children);const ctxInstance=(0,shared_instance_1.useCtxTooltipInstance)(),singletonInstance=singleton||ctxInstance,child=typeof children=="string"?react_1.default.createElement("span",null,children):children;return react_1.default.createElement(react_2.default,Object.assign({arrow:tippy_js_1.roundArrow,className:(0,classnames_1.default)(base_ui_theme_dark_theme_1.darkMode,breakline&&"tippy-breakLine",className),theme:THEME,interactive:!0,appendTo:mount_point_1.getMountPoint,popperOptions},rest,{singleton:singletonInstance}),child)}exports.Tooltip=Tooltip},7122:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useDocs=exports.docsFields=void 0;const client_1=__webpack_require__(53574);exports.docsFields=(0,client_1.gql)`
|
540
540
|
fragment docsFields on ReactDocs {
|
541
541
|
abstract
|
542
542
|
properties {
|
@@ -559,7 +559,7 @@ the following are permitted ${Object.keys(exports.IssuesClasses).join(", ")}`);c
|
|
559
559
|
}
|
560
560
|
}
|
561
561
|
${exports.docsFields}
|
562
|
-
`;function useDocs(componentId){var _a,_b;const{data}=(0,client_1.useQuery)(getProperties,{variables:{id:componentId.toString()}});return(_b=(_a=data?.getHost)===null||_a===void 0?void 0:_a.getDocs)===null||_b===void 0?void 0:_b.properties}exports.useDocs=useDocs},82718:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DefaultValue=exports.Properties=exports.useDocs=exports.docsFields=void 0;var get_docs_1=__webpack_require__(7122);Object.defineProperty(exports,"docsFields",{enumerable:!0,get:function(){return get_docs_1.docsFields}}),Object.defineProperty(exports,"useDocs",{enumerable:!0,get:function(){return get_docs_1.useDocs}}),Object.defineProperty(exports,"Properties",{enumerable:!0,get:function(){return get_docs_1.Properties}}),Object.defineProperty(exports,"DefaultValue",{enumerable:!0,get:function(){return get_docs_1.DefaultValue}})},28868:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultDocs=void 0;const defaultDocs=exports.defaultDocs={default:()=>null,labels:[],abstract:"",examples:[]}},84723:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BadgePosition",{enumerable:!0,get:function(){return _overview().BadgePosition}}),Object.defineProperty(exports,"Doc",{enumerable:!0,get:function(){return _docsEntities().Doc}}),Object.defineProperty(exports,"DocProp",{enumerable:!0,get:function(){return _docsEntities().DocProp}}),Object.defineProperty(exports,"DocPropList",{enumerable:!0,get:function(){return _docsEntities().DocPropList}}),Object.defineProperty(exports,"DocsAspect",{enumerable:!0,get:function(){return _docs().DocsAspect}}),Object.defineProperty(exports,"Overview",{enumerable:!0,get:function(){return _overview().Overview}}),exports.default=void 0,Object.defineProperty(exports,"defaultDocs",{enumerable:!0,get:function(){return _docs2().defaultDocs}});function _docs(){const data=__webpack_require__(12825);return _docs=function(){return data},data}function _docsEntities(){const data=__webpack_require__(87628);return _docsEntities=function(){return data},data}function _docs2(){const data=__webpack_require__(28868);return _docs2=function(){return data},data}function _overview(){const data=__webpack_require__(57682);return _overview=function(){return data},data}var _default=exports.default=_docs().DocsAspect},57682:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BadgePosition",{enumerable:!0,get:function(){return _overview().BadgePosition}}),Object.defineProperty(exports,"Overview",{enumerable:!0,get:function(){return _overview().Overview}});function _overview(){const data=__webpack_require__(93294);return _overview=function(){return data},data}},93294:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BadgePosition=void 0,exports.Overview=Overview;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _lodash(){const data=__webpack_require__(32699);return _lodash=function(){return data},data}function _component(){const data=__webpack_require__(68211);return _component=function(){return data},data}function _previewUi(){const data=__webpack_require__(27699);return _previewUi=function(){return data},data}function _componentUi(){const data=__webpack_require__(20884);return _componentUi=function(){return data},data}function _compositionsPanels(){const data=__webpack_require__(10726);return _compositionsPanels=function(){return data},data}function _baseReactThemes(){const data=__webpack_require__(15567);return _baseReactThemes=function(){return data},data}function _readmeSkeleton(){const data=__webpack_require__(95526);return _readmeSkeleton=function(){return data},data}function _overviewModule(){const data=_interopRequireDefault(__webpack_require__(8374));return _overviewModule=function(){return data},data}const _excluded=["onLoad","style"];function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}let BadgePosition=exports.BadgePosition=function(BadgePosition2){return BadgePosition2[BadgePosition2.Title=0]="Title",BadgePosition2[BadgePosition2.SubTitle=1]="SubTitle",BadgePosition2[BadgePosition2.Labels=2]="Labels",BadgePosition2[BadgePosition2.Package=3]="Package",BadgePosition2}({});function Overview({titleBadges,overviewOptions,previewProps,getEmptyState,TaggedAPI}){const component=(0,_react().useContext)(_component().ComponentContext),componentDescriptor=(0,_component().useComponentDescriptor)(),{current}=(0,_baseReactThemes().useThemePicker)(),overviewProps=(0,_lodash().flatten)(overviewOptions.values())[0],showHeader=!component.preview?.legacyHeader,EmptyState=getEmptyState&&getEmptyState(),buildFailed=component.buildStatus?.toLowerCase()!=="succeed"&&component?.host==="teambit.scope/scope",isScaling=Boolean(component.preview?.isScaling),includesEnvTemplate=Boolean(component.preview?.includesEnvTemplate),defaultLoadingState=_react().default.useMemo(()=>isScaling&&!includesEnvTemplate,[isScaling,includesEnvTemplate]),[isLoading,setLoading]=(0,_react().useState)(defaultLoadingState),iframeQueryParams=`onlyOverview=${component.preview?.onlyOverview||"false"}&skipIncludes=${component.preview?.skipIncludes||component.preview?.onlyOverview}`,overviewPropsValues=overviewProps&&overviewProps(),themeParams=current?.themeName?`theme=${current?.themeName}`:"",_ref=previewProps||{},{onLoad,style}=_ref,rest=_objectWithoutProperties(_ref,_excluded),onPreviewLoad=_react().default.useCallback((e,props)=>{setLoading(!1),onLoad?.(e,props)},[onLoad]);return _react().default.useEffect(()=>{!isLoading&&defaultLoadingState&&setLoading(!0),isLoading&&!defaultLoadingState&&setLoading(!1)},[component.id.toString(),defaultLoadingState]),_react().default.createElement("div",{className:(0,_classnames().default)(_overviewModule().default.overviewWrapper,isLoading&&_overviewModule().default.noOverflow),key:`${component.id.toString()}`},showHeader&&_react().default.createElement(_componentUi().ComponentOverview,{className:(0,_classnames().default)(_overviewModule().default.componentOverviewBlock,!isScaling&&_overviewModule().default.legacyPreview),displayName:component.displayName,version:component.version,abstract:component.description,labels:component.labels,packageName:component.packageName,titleBadges:(0,_lodash().flatten)(titleBadges.values()),componentDescriptor,component}),!buildFailed&&_react().default.createElement("div",{className:_overviewModule().default.readme},isLoading&&_react().default.createElement(_readmeSkeleton().ReadmeSkeleton,null,_react().default.createElement(_compositionsPanels().CompositionGallerySkeleton,{compositionsLength:Math.min(component.compositions.length,3)})),_react().default.createElement(_previewUi().ComponentPreview,_extends({onLoad:onPreviewLoad,previewName:"overview",pubsub:!0,queryParams:[iframeQueryParams,themeParams,overviewPropsValues?.queryParams||""],viewport:null,fullContentHeight:!0,disableScroll:!0},rest,{component,style:{width:"100%",height:"100%",minHeight:isScaling?void 0:500}})),component.preview?.onlyOverview&&!isLoading&&_react().default.createElement(_compositionsPanels().CompositionGallery,{component}),component.preview?.onlyOverview&&!isLoading&&TaggedAPI&&_react().default.createElement(TaggedAPI,{componentId:component.id.toString()})),buildFailed&&EmptyState&&_react().default.createElement(EmptyState,null))}},95526:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReadmeSkeleton=ReadmeSkeleton;function _react(){const data=_interopRequireDefault(__webpack_require__(59496));return _react=function(){return data},data}function _baseUiLoaders(){const data=__webpack_require__(20298);return _baseUiLoaders=function(){return data},data}function _overviewModule(){const data=_interopRequireDefault(__webpack_require__(8374));return _overviewModule=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ReadmeSkeleton({children}){return _react().default.createElement("div",{className:_overviewModule().default.readmeSkeleton},_react().default.createElement(_baseUiLoaders().LineSkeleton,{width:"80%"}),_react().default.createElement(_baseUiLoaders().LineSkeleton,{width:"70%"}),_react().default.createElement(_baseUiLoaders().LineSkeleton,{width:"40%",style:{marginBottom:40}}),_react().default.createElement(_baseUiLoaders().LineSkeleton,{width:"30%",style:{marginBottom:16}}),_react().default.createElement(_baseUiLoaders().BlockSkeleton,{lines:10,style:{width:"100%",marginBottom:40}}),children)}},33461:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLanes=exports.IgnoreDerivingFromUrl=exports.LanesProviderProps=exports.LanesProvider=exports.useLanesContext=exports.LanesContextModel=exports.LanesContext=void 0;var lanes_context_1=__webpack_require__(31499);Object.defineProperty(exports,"LanesContext",{enumerable:!0,get:function(){return lanes_context_1.LanesContext}}),Object.defineProperty(exports,"LanesContextModel",{enumerable:!0,get:function(){return lanes_context_1.LanesContextModel}}),Object.defineProperty(exports,"useLanesContext",{enumerable:!0,get:function(){return lanes_context_1.useLanesContext}});var lanes_provider_1=__webpack_require__(7811);Object.defineProperty(exports,"LanesProvider",{enumerable:!0,get:function(){return lanes_provider_1.LanesProvider}}),Object.defineProperty(exports,"LanesProviderProps",{enumerable:!0,get:function(){return lanes_provider_1.LanesProviderProps}}),Object.defineProperty(exports,"IgnoreDerivingFromUrl",{enumerable:!0,get:function(){return lanes_provider_1.IgnoreDerivingFromUrl}});var use_lanes_1=__webpack_require__(13655);Object.defineProperty(exports,"useLanes",{enumerable:!0,get:function(){return use_lanes_1.useLanes}})},31499:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLanesContext=exports.LanesContext=void 0;const react_1=__webpack_require__(59496);exports.LanesContext=(0,react_1.createContext)(void 0);const useLanesContext=()=>(0,react_1.useContext)(exports.LanesContext);exports.useLanesContext=useLanesContext},7811:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.LanesProvider=void 0;const react_1=__importStar(__webpack_require__(59496)),lanes_ui_models_lanes_model_1=__webpack_require__(53298),ui_foundation_ui_react_router_use_query_1=__webpack_require__(46718),base_react_navigation_link_1=__webpack_require__(98560),lanes_context_1=__webpack_require__(31499),use_lanes_1=__webpack_require__(13655);function LanesProvider({children,viewedLaneId:viewedIdFromProps,targetLanes,ignoreDerivingFromUrl:ignoreDerivingFromUrlFromProps,skipNetworkCall,options:optionsFromProps={},useScope}){var _a;const[lanesState,setLanesState]=(0,react_1.useState)(),[viewedLaneId,setViewedLaneId]=(0,react_1.useState)(viewedIdFromProps),{scope}=useScope?.()||{},skip=skipNetworkCall||!!targetLanes,options=(0,react_1.useMemo)(()=>{var _a2,_b,_c;return Object.assign({skip,ids:(_a2=optionsFromProps.ids)!==null&&_a2!==void 0?_a2:viewedLaneId?[viewedLaneId.toString()]:void 0,offset:(_b=optionsFromProps.offset)!==null&&_b!==void 0?_b:0,limit:(_c=optionsFromProps.limit)!==null&&_c!==void 0?_c:10},optionsFromProps)},[skip,optionsFromProps.ids,(_a=optionsFromProps.ids)===null||_a===void 0?void 0:_a.length,viewedLaneId?.toString()]),{lanesModel,loading,hasMore,fetchMoreLanes,offset,limit}=(0,use_lanes_1.useLanes)(targetLanes,skipNetworkCall,options,void 0,scope);(0,react_1.useEffect)(()=>{!loading&&lanesModel&&setLanesState(lanesModel)},[lanesModel,loading]);const updateViewedLane=(0,react_1.useCallback)(lane=>{setViewedLaneId(lane),setLanesState(state=>(state?.setViewedOrDefaultLane(lane),state))},[lanesModel]),location=(0,base_react_navigation_link_1.useLocation)(),query=(0,ui_foundation_ui_react_router_use_query_1.useQuery)(),ignoreDerivingFromUrl=(0,react_1.useCallback)(_location=>ignoreDerivingFromUrlFromProps?ignoreDerivingFromUrlFromProps.some(fn=>fn(_location)):!1,[]);(0,react_1.useEffect)(()=>{viewedIdFromProps&&updateViewedLane(viewedIdFromProps)},[viewedIdFromProps?.toString()]),(0,react_1.useEffect)(()=>{var _a2,_b;if(ignoreDerivingFromUrl(location))return;const viewedLaneIdToSet=location?.pathname&&lanes_ui_models_lanes_model_1.LanesModel.getLaneIdFromPathname(location?.pathname,query)||void 0||viewedLaneId||((_a2=lanesModel?.currentLane)===null||_a2===void 0?void 0:_a2.id)||((_b=lanesModel?.lanes.find(lane=>lane.id.isDefault()))===null||_b===void 0?void 0:_b.id);updateViewedLane(viewedLaneIdToSet)},[location?.pathname]),(0,react_1.useEffect)(()=>{setLanesState(existing=>{var _a2,_b;if(!loading&&lanesModel?.lanes.length){const state=new lanes_ui_models_lanes_model_1.LanesModel(Object.assign({},lanesModel));return viewedLaneId===void 0&&((_a2=lanesModel?.currentLane)===null||_a2===void 0?void 0:_a2.id)?state.setViewedOrDefaultLane((_b=lanesModel?.currentLane)===null||_b===void 0?void 0:_b.id):state.setViewedOrDefaultLane(viewedLaneId),state}return existing})},[loading,lanesModel?.lanes.length,viewedLaneId]);const lanesContextModel={lanesModel:lanesState,updateViewedLane,loading,hasMore,fetchMoreLanes,options,offset,limit};return react_1.default.createElement(lanes_context_1.LanesContext.Provider,{value:lanesContextModel},children)}exports.LanesProvider=LanesProvider},13655:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLanes=exports.useSearchLanes=void 0;const react_1=__webpack_require__(59496),ui_foundation_ui_hooks_use_data_query_1=__webpack_require__(48474),lanes_ui_models_lanes_model_1=__webpack_require__(53298),client_1=__webpack_require__(53574),lodash_1=__webpack_require__(32699),lanes_context_1=__webpack_require__(31499),GET_LANES=(0,client_1.gql)`
|
562
|
+
`;function useDocs(componentId){var _a,_b;const{data}=(0,client_1.useQuery)(getProperties,{variables:{id:componentId.toString()}});return(_b=(_a=data?.getHost)===null||_a===void 0?void 0:_a.getDocs)===null||_b===void 0?void 0:_b.properties}exports.useDocs=useDocs},82718:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DefaultValue=exports.Properties=exports.useDocs=exports.docsFields=void 0;var get_docs_1=__webpack_require__(7122);Object.defineProperty(exports,"docsFields",{enumerable:!0,get:function(){return get_docs_1.docsFields}}),Object.defineProperty(exports,"useDocs",{enumerable:!0,get:function(){return get_docs_1.useDocs}}),Object.defineProperty(exports,"Properties",{enumerable:!0,get:function(){return get_docs_1.Properties}}),Object.defineProperty(exports,"DefaultValue",{enumerable:!0,get:function(){return get_docs_1.DefaultValue}})},28868:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultDocs=void 0;const defaultDocs=exports.defaultDocs={default:()=>null,labels:[],abstract:"",examples:[]}},84723:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BadgePosition",{enumerable:!0,get:function(){return _overview().BadgePosition}}),Object.defineProperty(exports,"Doc",{enumerable:!0,get:function(){return _docsEntities().Doc}}),Object.defineProperty(exports,"DocProp",{enumerable:!0,get:function(){return _docsEntities().DocProp}}),Object.defineProperty(exports,"DocPropList",{enumerable:!0,get:function(){return _docsEntities().DocPropList}}),Object.defineProperty(exports,"DocsAspect",{enumerable:!0,get:function(){return _docs().DocsAspect}}),Object.defineProperty(exports,"Overview",{enumerable:!0,get:function(){return _overview().Overview}}),exports.default=void 0,Object.defineProperty(exports,"defaultDocs",{enumerable:!0,get:function(){return _docs2().defaultDocs}});function _docs(){const data=__webpack_require__(12825);return _docs=function(){return data},data}function _docsEntities(){const data=__webpack_require__(87628);return _docsEntities=function(){return data},data}function _docs2(){const data=__webpack_require__(28868);return _docs2=function(){return data},data}function _overview(){const data=__webpack_require__(57682);return _overview=function(){return data},data}var _default=exports.default=_docs().DocsAspect},57682:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BadgePosition",{enumerable:!0,get:function(){return _overview().BadgePosition}}),Object.defineProperty(exports,"Overview",{enumerable:!0,get:function(){return _overview().Overview}});function _overview(){const data=__webpack_require__(93294);return _overview=function(){return data},data}},93294:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BadgePosition=void 0,exports.Overview=Overview;function _react(){const data=_interopRequireWildcard(__webpack_require__(59496));return _react=function(){return data},data}function _classnames(){const data=_interopRequireDefault(__webpack_require__(97754));return _classnames=function(){return data},data}function _lodash(){const data=__webpack_require__(32699);return _lodash=function(){return data},data}function _component(){const data=__webpack_require__(68211);return _component=function(){return data},data}function _previewUi(){const data=__webpack_require__(27699);return _previewUi=function(){return data},data}function _componentUi(){const data=__webpack_require__(20884);return _componentUi=function(){return data},data}function _compositionsPanels(){const data=__webpack_require__(10726);return _compositionsPanels=function(){return data},data}function _baseReactThemes(){const data=__webpack_require__(15567);return _baseReactThemes=function(){return data},data}function _readmeSkeleton(){const data=__webpack_require__(95526);return _readmeSkeleton=function(){return data},data}function _overviewModule(){const data=_interopRequireDefault(__webpack_require__(8374));return _overviewModule=function(){return data},data}const _excluded=["onLoad","style"];function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e2){return e2?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}let BadgePosition=exports.BadgePosition=function(BadgePosition2){return BadgePosition2[BadgePosition2.Title=0]="Title",BadgePosition2[BadgePosition2.SubTitle=1]="SubTitle",BadgePosition2[BadgePosition2.Labels=2]="Labels",BadgePosition2[BadgePosition2.Package=3]="Package",BadgePosition2}({});function Overview({titleBadges,overviewOptions,previewProps,getEmptyState,TaggedAPI}){const component=(0,_react().useContext)(_component().ComponentContext),componentDescriptor=(0,_component().useComponentDescriptor)(),{current}=(0,_baseReactThemes().useThemePicker)(),overviewProps=(0,_lodash().flatten)(overviewOptions.values())[0],showHeader=!component.preview?.legacyHeader,EmptyState=getEmptyState&&getEmptyState(),buildFailed=component.buildStatus?.toLowerCase()!=="succeed"&&component?.host==="teambit.scope/scope",isScaling=Boolean(component.preview?.isScaling),includesEnvTemplate=Boolean(component.preview?.includesEnvTemplate),defaultLoadingState=_react().default.useMemo(()=>isScaling&&!includesEnvTemplate,[isScaling,includesEnvTemplate]),[isLoading,setLoading]=(0,_react().useState)(defaultLoadingState),iframeQueryParams=`onlyOverview=${component.preview?.onlyOverview||"false"}&skipIncludes=${component.preview?.skipIncludes||component.preview?.onlyOverview}`,overviewPropsValues=overviewProps&&overviewProps(),themeParams=current?.themeName?`theme=${current?.themeName}`:"",_ref=previewProps||{},{onLoad,style}=_ref,rest=_objectWithoutProperties(_ref,_excluded),onPreviewLoad=_react().default.useCallback((e,props)=>{setLoading(!1),onLoad?.(e,props)},[onLoad]);return _react().default.useEffect(()=>{!isLoading&&defaultLoadingState&&setLoading(!0),isLoading&&!defaultLoadingState&&setLoading(!1)},[component.id.toString(),defaultLoadingState]),_react().default.createElement("div",{className:(0,_classnames().default)(_overviewModule().default.overviewWrapper,isLoading&&_overviewModule().default.noOverflow),key:`${component.id.toString()}`},showHeader&&_react().default.createElement(_componentUi().ComponentOverview,{className:(0,_classnames().default)(_overviewModule().default.componentOverviewBlock,!isScaling&&_overviewModule().default.legacyPreview),displayName:component.displayName,version:component.version,abstract:component.description,labels:component.labels,packageName:component.packageName,titleBadges:(0,_lodash().flatten)(titleBadges.values()),componentDescriptor,component}),!buildFailed&&_react().default.createElement("div",{className:_overviewModule().default.readme},isLoading&&_react().default.createElement(_readmeSkeleton().ReadmeSkeleton,null,_react().default.createElement(_compositionsPanels().CompositionGallerySkeleton,{compositionsLength:Math.min(component.compositions.length,3)})),_react().default.createElement(_previewUi().ComponentPreview,_extends({onLoad:onPreviewLoad,previewName:"overview",pubsub:!0,queryParams:[iframeQueryParams,themeParams,overviewPropsValues?.queryParams||""],viewport:null,fullContentHeight:!0,disableScroll:!0},rest,{component,style:{width:"100%",height:"100%",minHeight:isScaling?void 0:500}})),component.preview?.onlyOverview&&!isLoading&&_react().default.createElement(_compositionsPanels().CompositionGallery,{component}),component.preview?.onlyOverview&&!isLoading&&TaggedAPI&&_react().default.createElement(TaggedAPI,{componentId:component.id.toString()})),buildFailed&&EmptyState&&_react().default.createElement(EmptyState,null))}},95526:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReadmeSkeleton=ReadmeSkeleton;function _react(){const data=_interopRequireDefault(__webpack_require__(59496));return _react=function(){return data},data}function _baseUiLoaders(){const data=__webpack_require__(20298);return _baseUiLoaders=function(){return data},data}function _overviewModule(){const data=_interopRequireDefault(__webpack_require__(8374));return _overviewModule=function(){return data},data}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ReadmeSkeleton({children}){return _react().default.createElement("div",{className:_overviewModule().default.readmeSkeleton},_react().default.createElement(_baseUiLoaders().LineSkeleton,{width:"80%"}),_react().default.createElement(_baseUiLoaders().LineSkeleton,{width:"70%"}),_react().default.createElement(_baseUiLoaders().LineSkeleton,{width:"40%",style:{marginBottom:40}}),_react().default.createElement(_baseUiLoaders().LineSkeleton,{width:"30%",style:{marginBottom:16}}),_react().default.createElement(_baseUiLoaders().BlockSkeleton,{lines:10,style:{width:"100%",marginBottom:40}}),children)}},33461:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLanes=exports.IgnoreDerivingFromUrl=exports.LanesProviderProps=exports.LanesProvider=exports.useLanesContext=exports.LanesContextModel=exports.LanesContext=void 0;var lanes_context_1=__webpack_require__(31499);Object.defineProperty(exports,"LanesContext",{enumerable:!0,get:function(){return lanes_context_1.LanesContext}}),Object.defineProperty(exports,"LanesContextModel",{enumerable:!0,get:function(){return lanes_context_1.LanesContextModel}}),Object.defineProperty(exports,"useLanesContext",{enumerable:!0,get:function(){return lanes_context_1.useLanesContext}});var lanes_provider_1=__webpack_require__(7811);Object.defineProperty(exports,"LanesProvider",{enumerable:!0,get:function(){return lanes_provider_1.LanesProvider}}),Object.defineProperty(exports,"LanesProviderProps",{enumerable:!0,get:function(){return lanes_provider_1.LanesProviderProps}}),Object.defineProperty(exports,"IgnoreDerivingFromUrl",{enumerable:!0,get:function(){return lanes_provider_1.IgnoreDerivingFromUrl}});var use_lanes_1=__webpack_require__(13655);Object.defineProperty(exports,"useLanes",{enumerable:!0,get:function(){return use_lanes_1.useLanes}})},31499:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLanesContext=exports.LanesContext=void 0;const react_1=__webpack_require__(59496);exports.LanesContext=(0,react_1.createContext)(void 0);const useLanesContext=()=>(0,react_1.useContext)(exports.LanesContext);exports.useLanesContext=useLanesContext},7811:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.LanesProvider=void 0;const react_1=__importStar(__webpack_require__(59496)),lanes_ui_models_lanes_model_1=__webpack_require__(53298),ui_foundation_ui_react_router_use_query_1=__webpack_require__(46718),base_react_navigation_link_1=__webpack_require__(6231),lanes_context_1=__webpack_require__(31499),use_lanes_1=__webpack_require__(13655);function LanesProvider({children,viewedLaneId:viewedIdFromProps,targetLanes,ignoreDerivingFromUrl:ignoreDerivingFromUrlFromProps,skipNetworkCall,options:optionsFromProps={},useScope}){var _a;const[lanesState,setLanesState]=(0,react_1.useState)(),[viewedLaneId,setViewedLaneId]=(0,react_1.useState)(viewedIdFromProps),{scope}=useScope?.()||{},skip=skipNetworkCall||!!targetLanes,options=(0,react_1.useMemo)(()=>{var _a2,_b,_c;return Object.assign({skip,ids:(_a2=optionsFromProps.ids)!==null&&_a2!==void 0?_a2:viewedLaneId?[viewedLaneId.toString()]:void 0,offset:(_b=optionsFromProps.offset)!==null&&_b!==void 0?_b:0,limit:(_c=optionsFromProps.limit)!==null&&_c!==void 0?_c:10},optionsFromProps)},[skip,optionsFromProps.ids,(_a=optionsFromProps.ids)===null||_a===void 0?void 0:_a.length,viewedLaneId?.toString()]),{lanesModel,loading,hasMore,fetchMoreLanes,offset,limit}=(0,use_lanes_1.useLanes)(targetLanes,skipNetworkCall,options,void 0,scope);(0,react_1.useEffect)(()=>{!loading&&lanesModel&&setLanesState(lanesModel)},[lanesModel,loading]);const updateViewedLane=(0,react_1.useCallback)(lane=>{setViewedLaneId(lane),setLanesState(state=>(state?.setViewedOrDefaultLane(lane),state))},[lanesModel]),location=(0,base_react_navigation_link_1.useLocation)(),query=(0,ui_foundation_ui_react_router_use_query_1.useQuery)(),ignoreDerivingFromUrl=(0,react_1.useCallback)(_location=>ignoreDerivingFromUrlFromProps?ignoreDerivingFromUrlFromProps.some(fn=>fn(_location)):!1,[]);(0,react_1.useEffect)(()=>{viewedIdFromProps&&updateViewedLane(viewedIdFromProps)},[viewedIdFromProps?.toString()]),(0,react_1.useEffect)(()=>{var _a2,_b;if(ignoreDerivingFromUrl(location))return;const viewedLaneIdToSet=location?.pathname&&lanes_ui_models_lanes_model_1.LanesModel.getLaneIdFromPathname(location?.pathname,query)||void 0||viewedLaneId||((_a2=lanesModel?.currentLane)===null||_a2===void 0?void 0:_a2.id)||((_b=lanesModel?.lanes.find(lane=>lane.id.isDefault()))===null||_b===void 0?void 0:_b.id);updateViewedLane(viewedLaneIdToSet)},[location?.pathname]),(0,react_1.useEffect)(()=>{setLanesState(existing=>{var _a2,_b;if(!loading&&lanesModel?.lanes.length){const state=new lanes_ui_models_lanes_model_1.LanesModel(Object.assign({},lanesModel));return viewedLaneId===void 0&&((_a2=lanesModel?.currentLane)===null||_a2===void 0?void 0:_a2.id)?state.setViewedOrDefaultLane((_b=lanesModel?.currentLane)===null||_b===void 0?void 0:_b.id):state.setViewedOrDefaultLane(viewedLaneId),state}return existing})},[loading,lanesModel?.lanes.length,viewedLaneId]);const lanesContextModel={lanesModel:lanesState,updateViewedLane,loading,hasMore,fetchMoreLanes,options,offset,limit};return react_1.default.createElement(lanes_context_1.LanesContext.Provider,{value:lanesContextModel},children)}exports.LanesProvider=LanesProvider},13655:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLanes=exports.useSearchLanes=void 0;const react_1=__webpack_require__(59496),ui_foundation_ui_hooks_use_data_query_1=__webpack_require__(48474),lanes_ui_models_lanes_model_1=__webpack_require__(53298),client_1=__webpack_require__(53574),lodash_1=__webpack_require__(32699),lanes_context_1=__webpack_require__(31499),GET_LANES=(0,client_1.gql)`
|
563
563
|
query Lanes(
|
564
564
|
$extensionId: String
|
565
565
|
$laneIds: [String!]
|