@oracle/oraclejet-audit 18.0.7 → 18.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/MetaLib.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * Licensed under The Universal Permissive License (UPL), Version 1.0
4
4
  * as shown at https://oss.oracle.com/licenses/upl/
5
5
  */
6
- "use strict";const Namespaces=require("./ns");const HtmlUtils=require("./HtmlUtils");const SemVer=require("semver");const NO_SUGGESTION_AVAIL="No suggestion available.";const OJPREFIX="oj-";const OJS="ojs/oj";const EVENT_ON="on";const DOT=".";const DATA_OJ_CMD="data-oj-command";const DASH_CHANGED="-changed";const CHANGED="Changed";const PROP_SLOTS="slots";const PROP_PROPS="props";const PROP_EVENTS="events";const PROP_IMPLEMENTS="implements";const PROP_FOLDER="folder";const PROP_VERSION="version";const PROP_UNSUP_THEME="unsupTheme";const PROP_SUBCOMPONENT_TYPE="subcomponentType";const PACK_PRIVATE="packPrivate";const ANTIPATTERN="antiPattern";const DEPRECATED="deprecated";const MAINTENANCE="maintenance";const SUPERSEDES="supersedes";const STATUS_PROP_TYPE="propertyType";const STATUS_PROP_VALUE="propertyValue";const FT_TSX="tsx";const STRING="string";const BOOLEAN="boolean";const OBJECT="object";function MetaLib(nd,runMode,msgCtx,utils,fsUtils){this._json=null;this._delHist=null;this._renHist=null;this._reqAttrs=null;this._nonClasses=null;this._implements=null;this._hasJetWCIFCs=false;this._components=null;this._compSvcs=null;this._stylesets=null;this._runMode=runMode;this._utils=utils;this._fsUtils=fsUtils;this._domUtils=null;if(nd.jetver){this._jetVersions=nd.jetver.getVersions()}this._jetVer=null;this._theme=null;this._curFileType=null;this._deprecatedMethods=null;this._deprecatedMembers=null;this._deletedMethods=null;this._deletedMembers=null;this._error=msgCtx.error;this._debug=msgCtx.debug;this._info=msgCtx.info;this._msg=msgCtx.msg;this._console=msgCtx.console;this._isDebug=msgCtx.isdebug;this._isVerbose=msgCtx.isVerbose;this._nd=nd};MetaLib.prototype.isNSRegistered=function(prefix){return Namespaces.has(prefix)};MetaLib.prototype.isNamespaceTag=function(tagName){var s=tagName.replace(/[<>]/g,"");var x,ret=false;if(tagName.startsWith("demo-")||tagName.startsWith("my-")||tagName.startsWith("ns-")){return true}while(true){x=s.lastIndexOf("-");if(x>=0){s=s.substring(0,x);if(s.lastIndexOf("-")<0&&s==="oj"){break}if(Namespaces.has(s)){ret=true;break}}else{break}}if(!ret&&this.isJetTag(tagName)){ret=true}return ret};MetaLib.prototype.isNamespacePrefix=function(tagName){return this.isNamespaceTag(tagName)};MetaLib.prototype.isRuleIgnored=function(tagName,ruleName){var o,ret=false;if(o=this._getComponentFromTag(tagName)){if(o.extension&&o.extension.audit&&o.extension.audit.ignore){let ar=o.extension.audit.ignore;if(ar&&ar.length){ret=ar.includes(ruleName)}}}else{ret=this._components&&this._components.isRuleIgnored(tagName,ruleName)}return ret};MetaLib.prototype.isJetCoreTag=function(tag){return!!this._components.isJetCoreTag(tag)};MetaLib.prototype.isCoreTag=function(tag){return this.isJetCoreTag(tag)};MetaLib.prototype.isJetLegacyTag=function(tag){return this._getComponentNameFromTag(_removeChevrons(tag))};MetaLib.prototype.isJetTag=function(tagName){return!!(this._components.isJetCoreTag(tagName)||this.isJetLegacyTag(tagName))};MetaLib.prototype.isComponentTag=function(tagName){return tagName?this._components&&this._components.isUserTag(_removeChevrons(tagName)):false};MetaLib.prototype.isWCTag=function(tagName){var ret=false;if(tagName){tagName=_removeChevrons(tagName);ret=this._getComponentNameFromTag(tagName)||this._components&&this._components.isKnownTag(tagName)}return ret};MetaLib.prototype.isCCATag=function(tagName){return tagName?this.isWCTag(tagName):false};MetaLib.prototype.isVComponentTag=function(tagName){return tagName?this._components.isVComponentTag(tagName):false};MetaLib.prototype.isTagDeprecated=function(tagName){var clazz,ret;if(clazz=this._getComponentNameFromTag(_removeChevrons(tagName))){ret=this.isClassDeprecated(clazz)}else{ret=this._components.isTagDeprecated(tagName)}return ret};MetaLib.prototype.isTagAttrDeprecated=function(tagName,attrName){var member,ret=null;if(!attrName){return null}member=this._getTagAttrMemberObj(tagName,attrName);ret=member?this._isSubStateDeprecated(member,true):this._components.isTagAttrDeprecated(tagName,attrName);if(ret){ret.forEach(status=>{if(status.description){status.description=HtmlUtils.replaceEntities(status.description)}})}return ret};MetaLib.prototype.isTagEventDeprecated=function(tag,attr){var comp,member,ev,deps,retStatus=null;if(comp=this._getComponentFromTag(tag)){if(!comp.event&&!comp.member){return null}if(ev=this._getLegacyEventName(comp,attr)){if(comp.event&&(member=comp.event[ev])||comp.htmlattributes&&(member=comp.member[ev])){if(deps=member.ojdeprecated){if(deps.length){retStatus=this._createLegacyDeprecatedStatus(deps,true)}}}}}else{retStatus=this._components.isTagEventDeprecated(tag,attr)}return retStatus};MetaLib.prototype._getLegacyEventName=function(comp,eventName){var event,ev;if(!eventName.includes("-")){eventName=this._domUtils.kebabCase(eventName)}if(comp.htmlevents&&(ev=comp.htmlevents[eventName])||eventName.endsWith(DASH_CHANGED)&&(ev=comp.htmlattributes[eventName])){if(!(comp.event&&comp.event[ev])){if(ev.endsWith(CHANGED)){ev=ev.substring(0,ev.length-CHANGED.length)}}}return ev?ev:null};MetaLib.prototype.getTagPropertyFromEvent=function(tagName,eventName){var comp,ev;if(comp=this._getComponentFromTag(tagName)){ev=this._getLegacyEventName(comp,eventName)}else{if(ev=this._components.getTagPropertyFromEvent(tagName,eventName)){ev=ev.name}}return ev?ev:null};MetaLib.prototype.isTagAttr=function(tagName,attrName){var o,ret=false;if(!attrName){return false}attrName=attrName.charAt(0)===":"?attrName.substring(1):attrName;if(o=this._getComponentFromTag(tagName)){ret=this.isJetTagAttr(o,attrName)}else{ret=this._components&&this._components.isTagAttr(tagName,attrName)}return ret};MetaLib.prototype.isJetTagAttr=function(tagObj,attrName){var ret;if(!attrName){return false}attrName=attrName.charAt(0)===":"?attrName.substring(1):attrName;ret=this._curFileType===FT_TSX?tagObj.member&&tagObj.member[attrName]:tagObj.htmlattributes&&tagObj.htmlattributes[attrName];if(!ret&&attrName===DATA_OJ_CMD&&tagObj.member){ret=tagObj.member[DATA_OJ_CMD]}return!!ret};MetaLib.prototype._getTagAttrMemberObj=function(tagName,attrName){var obj,attrib,member,x;if(!attrName){return null}obj=this._getComponentFromTag(_removeChevrons(tagName));attrName=attrName.charAt(0)===":"?attrName.substring(1):attrName;if(this._curFileType===FT_TSX){attrName=this._domUtils.kebabCase(attrName)}if(!obj||!obj.htmlattributes||!obj.htmlattributes[attrName]){return null}member=null;attrib=obj.htmlattributes[attrName];if(attrib){x=attrib.indexOf(DOT);if(x>=0){if(obj.member){member=this._findSubMember(obj,obj.member,attrib,attrib)}}else{member=obj.member[attrib];if(member){return member}}}return member};MetaLib.prototype._findSubMember=function(obj,mem,attrName,subMemberPart){var member,ts,sm,rest,x,ret=null;x=subMemberPart.indexOf(DOT);if(x>=0){sm=subMemberPart.substring(0,x);rest=subMemberPart.substring(x+1)}else{sm=subMemberPart;rest=null}for(member in mem){member=mem[member];if(member.name===attrName&&!rest){ret=member;break}if(member.name!==sm){continue}if(!rest){ret=member;break}if(member.submember){ret=this._findSubMember(obj,member.submember,attrName,rest);if(ret){break}}else if(member.tstype){ts=this._getTsTypeObject(member);if(ts){ret=this._findSubMember(obj,ts.member,attrName,rest);if(ret){break}}}if(ret){break}}return ret};MetaLib.prototype._getTsTypeObject=function(mem){var ts,o,s,x;ts=mem.tstype;if(ts&&ts.target==="Type"&&typeof ts.value===STRING){s=ts.value;s=s.replace("=","");x=s.indexOf("|");if(x>=0){s=s.substring(0,x).trimRight()}if(s.charAt(s.length-1)===">"){x=s.lastIndexOf("<");if(s>=0){s=s.substring(0,x)}}o=this._json[s];if(!o){o=this._json[mem.memberof];if(o.typedef){s=ts.value;x=s.lastIndexOf(DOT);if(x>=0){s=s.substring(x+1);o=o.typedef[s]}}}}return o?o:null};MetaLib.prototype._getSubMemberPart=function(fullAttr,soFar){var s,x;s=fullAttr.replace(soFar,"");if(s.length){if(s.charAt(0)==="."){x=s.indexOf(DOT,1);if(x>=0){s=soFar+s.substring(0,x)}else{s=soFar+s}}}else{s=soFar}return s};MetaLib.prototype._handleAttrObject=function(member){var link,types,i,x;types=member.tstype;if(types){for(i=0;i<types.length;i++){if(types[i].target==="Type"){link=types[i].value;link=link.replace("=","");x=link.indexOf("<K");if(x>=0){link=link.substring(0,x)}break}}}return link};MetaLib.prototype.hasTagAttrValues=function(tagName,attrName){var member,ojv,ret=false;if(!attrName){return false}if(member=this._getTagAttrMemberObj(tagName,attrName)){ojv=this._getOjValues(member);ret=!!ojv}else if(this._components.isKnownTag(tagName)){ret=this._components.hasTagAttrValues(tagName,attrName)}return ret};MetaLib.prototype.isTagAttrValue=function(tagName,attrName,attrValue){var member,ojv,values,curValue,valType,i,ret=false;if(!attrName){return false}member=this._getTagAttrMemberObj(tagName,attrName);if(member){ojv=this._getOjValues(member);if(ojv){values=ojv.name;for(i=0;i<values.length;i++){if(ojv.type){valType=ojv.type[i];curValue=_convertValue(valType,attrValue);ret=curValue===values[i]}else{ret=attrValue===values[i]}if(ret){break}}}else{ret=true}}else{if(this._components.isKnownTag(tagName)){ret=this._components.isTagAttrValue(tagName,attrName,attrValue)}}return ret};MetaLib.prototype.isTagAttrEnumValueDeprecated=function(tagName,attrName,enumValue){var member,ojv,values,deps,dep,i,j,ret=null;if(!attrName){return null}member=this._getTagAttrMemberObj(tagName,attrName);if(!member){return this._isCompTagAttrEnumDepr(tagName,attrName,enumValue)}if(!member.ojdeprecated){return null}if(ojv=this._getOjValues(member)){values=ojv.name;for(i=0;i<values.length;i++){if(values[i]===enumValue){deps=member.ojdeprecated;for(j=0;j<deps.length;j++){dep=deps[j];if(dep.type&&dep.type!=="deprecated"){continue}if(dep.target==="propertyValue"&&dep.for===enumValue){ret={type:DEPRECATED,since:dep.since,description:dep.description};break}}}if(ret){break}}}return ret};MetaLib.prototype._isCompTagAttrEnumDepr=function(tagName,attrName,enumValue){if(!attrName){return null}return this._components?this._components.isTagAttrEnumDeprecated(tagName,attrName,enumValue):null};MetaLib.prototype.hasTagSlot=function(tagName){var ret;if(this.isJetLegacyTag(tagName)){ret=this._getSlots(tagName)?true:false}else if(this._components){this._components.hasTagSlot(tagName)}return ret};MetaLib.prototype.hasTagDefaultSlot=function(tagName){return this.isTagSlotName(tagName,"")};MetaLib.prototype.hasTagDynamicSlot=function(tagName){var tag,comp,members,b=false;tag=_removeChevrons(tagName);if(comp=this._getComponentFromTag(tag)){b=!!comp.header?.ojdynamicslot}else if(this._components){b=this._components.hasTagDynamicSlot(tag)}return b};MetaLib.prototype.isTagSlotName=function(tagName,slotName){var tag,slot;tag=_removeChevrons(tagName);slotName=slotName?slotName:"";if(this.isJetLegacyTag(tag)){slot=this._getSlotByName(this._getComponentFromTag(tag),slotName)}else if(this._components){if(!HtmlUtils.isCommonElem(tag)){slot=this._components.hasTagSlotName(tag,slotName)}}return!!slot};MetaLib.prototype.isTagSlotValue=function(tagName,slotName){return this.isTagSlotName(tagName,slotName)};MetaLib.prototype.isTagDynamicSlotValue=function(tagName,slotName){};MetaLib.prototype.getPreferredSlotContent=function(tag,slot){var obj,ret=null;if(obj=this.getPreferredSlotContentEx(tag,slot)){ret=obj.interfaces}return ret};MetaLib.prototype.getPreferredSlotContentEx=function(tag,slot){var ret;tag=_removeChevrons(tag);slot=slot?slot:"";if(this.isJetLegacyTag(tag)){ret=this.getJetPreferredSlotContent(tag,slot)}else if(this._components&&this._implements){ret=this._components.getPreferredSlotContent(tag,slot,this._implements)}return ret};MetaLib.prototype.getJetPreferredSlotContent=function(tag,slot){var clazz,slot,prefContent,content,comps;if(!this._implements||!(clazz=this._getComponentFromTag(tag))){return null}if(!slot){let defMem;if(clazz.member&&(defMem=clazz.member["Default"])&&defMem.ojchild){if(prefContent=defMem.ojpreferredcontent){prefContent.forEach(impl=>{if(content=this._implements[impl]){if(!comps){comps=[]}comps.push(...content)}})}}}else{if(clazz.slot){if(slot=clazz.slot[slot]){if(prefContent=slot.ojpreferredcontent){prefContent.forEach(impl=>{if(content=this._implements[impl]){if(!comps){comps=[]}comps.push(...content)}})}}}}return prefContent||comps?{interfaces:prefContent,components:comps}:null};MetaLib.prototype.isTagSlotDeprecated=function(tag,slotName){var status,md,ret;md=this.getTagSlotMetadata(tag,slotName);if(md&&(status=md.status)){let stat;for(let i=0;i<status.length;i++){stat=status[i];if(!stat.type||stat.type===DEPRECATED){ret=stat;break}}}return ret?ret:null};MetaLib.prototype.getTagSlotMetadata=function(tag,slot){var ret;tag=_removeChevrons(tag);if(this.isJetLegacyTag(tag)){ret=this._getJetTagSlotMetadata(tag,slot)}else if(this._components){ret=this._components.getTagSlotMetadata(tag,slot)}return ret};MetaLib.prototype._getJetTagSlotMetadata=function(tag,slotName){var o,slot;if(!(o=this._getComponentFromTag(tag))){return null}if(!o.slot||!(slot=o.slot[slotName])){return null}let deps,ret={};if(slot.ojpreferredcontent){ret.preferredContent=slot.ojpreferredcontent}if(slot.hasOwnProperty("ojminitems")){ret.minItems=slot.ojminitems}if(slot.hasOwnProperty("ojmaxitems")){ret.maxItems=slot.ojmaxitems}if(deps=slot.ojdeprecated){let dep,oStat,i;ret.status=[];for(i=0;i<deps.length;i++){dep=deps[i];oStat={};if(dep.hasOwnProperty("type")){oStat.type=dep.type}if(!dep.type||dep.type===DEPRECATED){if(dep.hasOwnProperty("target")){oStat.target=dep.target}if(dep.hasOwnProperty("for")){oStat.for=dep.for}if(dep.hasOwnProperty("value")){oStat.value=dep.value}}else if(dep.type===ANTIPATTERN){if(dep.hasOwnProperty("themes")){oStat.themes=dep.themes}}if(dep.hasOwnProperty("since")){oStat.since=dep.since}if(dep.hasOwnProperty("description")){oStat.description=dep.description}ret.status.push(oStat)}}return ret};MetaLib.prototype.isTagSupportedInTheme=function(tag){var o,a,ret=true;o=this._getComponentFromTag(tag);if(o){if(o.header){a=o.header.ojunsupportedthemes;ret=!(a&&a.includes(this._theme))}}else{ret=this._components&&this._components.isTagSupportedInTheme(tag,this._theme)}return ret};MetaLib.prototype.isAttrSupportedInTheme=function(tag,attr){var o,a,ret=true;o=this._getTagAttrMemberObj(tag,attr);if(o){a=o.ojunsupportedthemes;ret=!(a&&a.includes(this._theme))}else{ret=this._components.isAttrSupportedInTheme(tag,attr,this._theme)}return ret};MetaLib.prototype.hasTagCompPropSubprop=function(tagName,propName){var obj,ret=false;if(this.isCCATag(tagName)){obj=this._getComponentFromTag(tagName);if(obj&&obj.member){ret=obj.member[propName];ret=ret&&ret.submember}else if(this._components){ret=this._components.getTagProp(tagName,propName);ret=ret&&ret.properties}}return ret};MetaLib.prototype.isTagCompProp=function(tagName,propName){var obj,ret=false;if(this.isCCATag(tagName)){obj=this._getComponentFromTag(tagName);if(obj&&obj.member){ret=obj.member[propName]}else if(this._components){ret=this._components.isTagProp(tagName,propName)}}return ret};MetaLib.prototype.getTagAttrType=function(tag,attr){var member=this._getTagAttrMemberObj(tag,attr);return member?member.type:this._components.getTagPropType(tag,attr)};MetaLib.prototype.getTagAttrTypeEx=function(tag,attr){var ret={};var member=this._getTagAttrMemberObj(tag,attr);var t=member?member.type:this._components.getTagPropType(tag,attr);ret.raw=t;ret.types=t.split("|");ret.types.forEach((v,i,ar)=>{v=v.trim().toLowerCase().replace("array","Array");ar[i]=v.replace(">.",">")});return ret};MetaLib.prototype.getTagPropType=function(tagName,propName){return this._components?this._components.getTagPropType(tagName,propName):null};MetaLib.prototype.getTagPropMetadata=function(tag,attr){var obj;if(this._components){obj=this._components.getComponentPropMetadata(tag,attr)}return obj};MetaLib.prototype.getTagMetadata=function(tagName){var obj,comp,hdr,events,props,event,ret=null;tagName=_removeChevrons(tagName);if(!(obj=this._getComponentFromTag(tagName))){if(this._components){ret=this._components.getComponentMetadata(tagName)}return ret}if(hdr=obj.hdr){comp={};comp.name=hdr.customelement;if(hdr.slot){comp[PROP_SLOTS]=obj.slots}}if(obj.properties){comp[PROP_PROPS]=props={};this._extractProps(props,null,obj.properties,obj.name)}if(obj.events){comp[PROP_EVENTS]=events={};for(event in obj.events){}}if(obj.implements){comp[PROP_IMPLEMENTS]=obj.implements}if(obj.extension&&obj.extension.theme&&obj.extension.theme.unsupportedThemes){comp[PROP_UNSUP_THEME]=obj.extension.theme.unsupportedThemes}if(hdr&&hdr.ojsubcomponenttype){comp[PROP_SUBCOMPONENT_TYPE]=hdr.subcomponenttype}return ret};MetaLib.prototype.getAllCustomMetadata=function(){return this._components.getAllCustomMetadata()};MetaLib.prototype.getOjcMetadataByPath=function(path){return this._components.getOjcMetadataByPath(path)||null};MetaLib.prototype._getObjectMetadata=function(name){return this._json[name]};MetaLib.prototype.getPackPaths=function(){return this._components?this._components.getPackPaths():null};MetaLib.prototype.getPackMetadata=function(packName){return this._components?this._components.getPackMetadata(packName):null};MetaLib.prototype.getAllPackMetadata=function(){return this._components?this._components.getAllPackMetadata():null};MetaLib.prototype.getAllResourceMetadata=function(){return this._components?this._components.getAllResourceMetadata():null};MetaLib.prototype.getResourceMetadata=function(path){return this._components?this._components.getResourceMetadata(path):null};MetaLib.prototype.getResourcePaths=function(){return this._components?this._components.getResourcePaths():null};MetaLib.prototype.isTagStyleDeprecated=function(tagName,styleName){var o,ret;o=this.isWCStyleDeprecated(styleName);if(o){tagName=_removeChevrons(tagName);if(this._json.ojStyles.containers[o.index]===tagName){ret=o.dep.description}}return ret};MetaLib.prototype.isTagStyle=function(tagName,styleName){var obj,ret=false,compName,containers,indices,index,i;tagName=_removeChevrons(tagName);if(obj=this._getComponentFromTag(tagName)){compName=this._getComponentNameFromTag(tagName);containers=this._json.ojStyles.containers;indices=_getStyleIndices(this._json.ojStyles,styleName);if(indices){for(i=0;i<indices.length;i++){index=indices[i];if(index>=0){if(containers[index]===compName){ret=true;break}}}}}else{ret=this._components.isTagStyle(tagName)}return ret};MetaLib.prototype.isStyle=function(style){return this.isGenStyle(style)||this.isClassStyle(style)||this.isStylesetStyle(style)};MetaLib.prototype.isGenStyle=function(style){var x=this._json.genericStyles[style];return x||x===0?true:false};MetaLib.prototype.isJetStyle=function(style){return this._json.genericStyles[style]?"g":this._json.ojStyles[style]?"j":undefined};MetaLib.prototype.isCustomStyle=function(style){return this._components&&this._components.isStyle(style)};MetaLib.prototype.getStyleOrigin=function(style){var ret;if(this._json.genericStyles[style]){ret="g"}if(this._json.ojStyles[style]){ret=ret?"b":"j"}if(!ret&&this._components){if(this._components.isStyle(style)){ret="c"}}return ret};MetaLib.prototype.isClassStyle=function(style){var x=this._json.ojStyles[style];return x||x===0?true:false};MetaLib.prototype.isStylesetStyle=function(style){return this._stylesets?!!this._stylesets[style]:false};MetaLib.prototype.getStyleSelector=function(style,jet){var o,i,ret;if(typeof jet===BOOLEAN){o=jet?this._json.ojStyles[style]:this._json.genericStyles[style]}else{o=this._json.ojStyles[style];if(!o&&o!==0){o=this._json.genericStyles[style]}if(!o&&this._components){o=this._components.getStyleMetadata(style)}}if(this._utils.isObject(o)){if(o.styleselector){ret=o.styleselector}else if(o.meta){ret=o.meta.styleSelector}}else if(Array.isArray(o)){for(i=0;i<o.length;i++){if(this._utils.isObject(o[i])&&o[i].styleselector){if(!ret){ret=[]}ret.push(o[i].styleselector)}}if(ret&&ret.length===1){ret=ret[0]}}return ret?ret:null};MetaLib.prototype.isJetStylePrefix=function(s){var x;if(!s.startsWith(OJPREFIX)||!this._json.jetCssPrefixes.classes){return false}x=s.indexOf("-",3);if(x>=0){s=s.substring(0,x)}return this._json.jetCssPrefixes.classes.includes(s)};MetaLib.prototype.hasJetStylePrefixes=function(){return this._json.jetCssPrefixes&&this._json.jetCssPrefixes.classes};MetaLib.prototype.getClassesFromStyle=function(styleName,scope){var indices,oStyles,ret;scope=scope||"oj";if(scope==="oj"||scope==="both"){oStyles=this._json.ojStyles;if(oStyles){indices=_getStyleIndices(oStyles,styleName);if(indices){return _toContainers(oStyles,indices)}}}if(scope==="gen"||scope==="both"){oStyles=this._json.genericStyles;if(oStyles){indices=_getStyleIndices(oStyles,styleName);if(indices){ret=_toContainers(oStyles,indices)}}}return ret?ret:null};MetaLib.prototype.getJetTagFromStyle=function(styleName){var indices,oStyles,clazz;oStyles=this._json.ojStyles;if(oStyles){indices=_getStyleIndices(oStyles,styleName)}if(indices){if(indices.length>1||indices.length===0){clazz=null}else{clazz=this.isGenStyle(styleName)?null:_toContainers(oStyles,indices)}}return clazz?this.getTagFromClass(clazz):null};MetaLib.prototype.getJetTagsFromStyle=function(styleName){var indices,oStyles;oStyles=this._json.ojStyles;if(oStyles){indices=_getStyleIndices(oStyles,styleName);if(indices){return _toContainers(oStyles,indices,this._json)}}return null};MetaLib.prototype.getClassFromTag=function(tagName){return this._getComponentNameFromTag(_removeChevrons(tagName))};MetaLib.prototype.getClassFromModule=function(module){var clazz=this._json.moduleLookup[module];return clazz?clazz:null};MetaLib.prototype.getTagFromClass=function(className){if(className==="oj.ojTree"){return"oj-tree"}let ret=this._json[className];return ret&&ret.header?ret.header.customelement:null};MetaLib.prototype.isClass=function(className){var b=this._json[className];if(!b){if(className=this._classChange[className]){b=this._json[className]}}return!!b};MetaLib.prototype.isClassFinal=function(className){var clazz=this._json[className];if(!clazz){if(className=this._classChange[className]){clazz=this._json[className]}}return clazz&&clazz.header&&clazz.header.readonly};MetaLib.prototype.isClassMethod=function(className,methName){var clazz=this._json[className];return!!(clazz&&clazz.function&&clazz.function[methName])};MetaLib.prototype.isClassMethodStatic=function(className,methName){var meth,ret=null;var clazz=this._json[className];if(clazz&&clazz.function){meth=clazz.function[methName];ret=meth&&meth.scope&&meth.scope=="static"}return ret};MetaLib.prototype.getClassMethodScope=function(className,methName){var meth,ret=null;var clazz=this._json[className];if(clazz&&clazz.function){meth=clazz.function[methName];ret=meth.scope}return ret};MetaLib.prototype.isClassMember=function(className,memName){var clazz=this._json[className];return!!(clazz&&clazz.member&&clazz.member[memName])};MetaLib.prototype.isClassMemberStatic=function(className,memName){var mem,ret=null;var clazz=this._json[className];if(clazz&&clazz.member){mem=clazz.member[memName];ret=mem&&mem.scope&&mem.scope=="static"}return ret};MetaLib.prototype.getRequiredAttrs=function(tagName){let obj,clazz,i,ret=null;tagName=_removeChevrons(tagName);if(obj=this._getComponentFromTag(tagName)){clazz=this._getComponentNameFromTag(tagName)}ret=obj?this._reqAttrs[clazz]:this._components.getRequiredProps(tagName);if(this._curFileType!==FT_TSX&&ret&&ret.length){let ret2=[];for(i=0;i<ret.length;i++){ret2[i]=this._domUtils.kebabCase(ret[i])}ret=ret2}return ret};MetaLib.prototype.getTagsFromStyle=function(styleName){var classNames,tag,i,ret;ret=null;classNames=this.getClassesFromStyle(styleName);if(classNames){for(i=0;i<classNames.length;i++){tag=this.getTagFromClass(classNames[i]);if(tag){if(!ret){ret=[]}ret.push(tag)}}}return ret?ret:null};MetaLib.prototype.isStyleDeprecated=function(name){var s,o,t,i;s=this._json.genericStyles[name];if(!s&&s!==0&&this._json.ojStyles){s=this._json.ojStyles[name];if(!s&&s!==0&&this._stylesets){if(s=this._stylesets[name]){if(this._utils.isObject(s)){return!s.type||s.type==="deprecated"?s:null}}}}if(s){t=typeof s;if(Array.isArray(s)){for(i=0;i<s.length;i++){o=s[0];if(typeof o===OBJECT){if(!o.type||o.type==="deprecated"){break}}}}else if(t==="object"){if(!s.type||s.type==="deprecated"){o=s}}else{o=null}}return o?o.dep:null};MetaLib.prototype.isStyleDeprecatedEx=function(style){var a=null,ss,t,i;function _pushSS(o){if(o.dep){if(!o.dep.type||o.dep.type==="deprecated"){if(!a){a=[]}a.push(o)}}};function _stashSS(s){t=typeof s;if(Array.isArray(s)){for(i=0;i<s.length;i++){_pushSS(s[i])}}else if(t==="object"){_pushSS(s)}};if(ss=this._json.genericStyles[style]){_stashSS(ss)}if(ss=this._json.ojStyles[style]){_stashSS(ss)}else if(ss!==0&&this._stylesets){ss=this._stylesets[style];return this._utils.isObject(ss)?ss:null}return a};MetaLib.prototype.isWCStyleDeprecated=function(name){var s,o,t,i;s=this._json.ojStyles[name];if(s){t=typeof s;if(Array.isArray(s)){for(i=0;i<s.length;i++){o=s[i];if(typeof o===OBJECT){break}o=null}}else if(t==="object"){o=s}}return o?o:null};MetaLib.prototype.isBindingTag=function(tagName){var obj=this._getComponentFromTag(_removeChevrons(tagName));return obj&&obj.header?!!obj.header.ojbindingelement:false};MetaLib.prototype.isComponent=function(className){var obj=this._json[className];if(!obj){if(!className.startsWith("oj.")){obj=this._json["oj."+className]}}return!!obj};MetaLib.prototype.isClass=function(className){return!!this._json[className]};MetaLib.prototype.isJetComponentClass=function(className){return this.isClass(className)};MetaLib.prototype.isComponentDeprecated=function(className){return this.isClassDeprecated(className)};MetaLib.prototype.isClassDeleted=function(className){var classes,cn,version=null;if(this._delHist){if(classes=this._delHist.classes){cn=this._classChange[className];if(cn){className=cn}version=classes[className]}}return version};MetaLib.prototype.isClassRenamed=function(className){return this._renHist?this._renHist[className]:null};MetaLib.prototype.isClassDeprecated=function(className){var obj,ret=null;if(className==="oj.ojTree"){if(SemVer.gte(this._jetVer,"5.2.0")){return null}else{return{type:DEPRECATED,since:"5.2.0",description:"Use ojTreeView instead"}}}if(!(obj=this._json[className])){className=this._classChange[className];obj=className?this._json[className]:undefined}if(obj){if(obj.header){ret=this._isClassDeprecated(obj.header);if(ret&&ret.description){ret.description=this._utils.removeLink(ret.description)}}if(!ret){ret=this._isClassDeprecated(obj)}}return ret};MetaLib.prototype._isClassDeprecated=function(obj){var depr,status,ret=null;if(obj){if(obj.ojdeprecated&&obj.ojdeprecated.length){depr=obj.ojdeprecated;for(status of depr){if(!status.type||status.type===DEPRECATED){ret=status;if(!ret.type){ret.type=DEPRECATED}break}}}else if(depr=obj.deprecated){ret={type:DEPRECATED,description:typeof depr===BOOLEAN?NO_SUGGESTION_AVAIL:depr}}}return ret};MetaLib.prototype.isClassMethodDeleted=function(className,methodName){var a,cn,i,ret=null;a=this._deletedMethods[methodName];if(a){cn=this._classChange[className];if(cn){className=cn}for(i=0;i<a.length;i++){if(a[i]===className){ret=a[i+1];break}i++}}return ret};MetaLib.prototype.isClassMethodDeprecated=function(className,methodName){var obj,method,ret=null;obj=this._json[className];if(!obj){className=this._classChange[className];obj=className?this._json[className]:undefined}if(obj&&obj.function){for(method in obj.function){if(method===methodName){method=obj.function[method];ret=this._isSubStateDeprecated(method);break}}}return ret};MetaLib.prototype.isClassMemberDeleted=function(className,memberName){var a,i,cname,ret=null;a=this._deletedMembers[memberName];if(a){cname=this._classChange[className];for(i=0;i<a.length;i++){if(a[i]===className||a[i]===cname){ret=a[i+1];break}i++}}return ret};MetaLib.prototype.isClassMemberDeprecated=function(className,memName){var obj,member,obj,ret=null;obj=this._json[className];if(!obj){className=this._classChange[className];obj=className?this._json[className]:undefined}if(obj&&obj.member){memName=memName.charAt(0)===":"?memName.substring(1):memName;for(member in obj.member){if(member===memName){member=obj.member[memName];ret=this._isSubStateDeprecated(member,true);break}}}return ret};MetaLib.prototype.isClassAttrDeprecated=function(className,attrName){var obj,member,ret=null;obj=this._json[className];attrName=attrName.charAt(0)===":"?attrName.substring(1):attrName;if(obj&&obj.member){for(member in obj.member){member=obj.member[member];if(attrName===member.name){ret=this._isSubStateDeprecated(member,true);break}}}return ret};MetaLib.prototype.isComponentDeleted=function(className){return this.isClassDeleted(className)};MetaLib.prototype.isComponentAttrDeprecated=function(className,attrName){return this.isClassAttrDeprecated(className,attrName)};MetaLib.prototype.isComponentMethodDeprecated=function(className,methodName){return this.isClassMethodDeprecated(className,methodName)};MetaLib.prototype.isComponentMemberDeprecated=function(className,memberName){return this.isClassMemberDeprecated(className,memberName)};MetaLib.prototype.isComponentMethodDeleted=function(className,methodName){return this.isClassMethodDeleted(className,methodName)};MetaLib.prototype.isComponentMemberDeleted=function(className,memberName){return this.isClassMemberDeleted(className,memberName)};MetaLib.prototype.isTagPackPrivate=function(tag){var o,ret;if(!tag){return false}tag=_removeChevrons(tag);if(this.isJetTag(tag)){if(o=this._getComponentFromTag(tag)){ret=o.header&&o.header.ojsubcomponenttype===PACK_PRIVATE}}else if(this._components){ret=this._components.isTagPackPrivate(tag)}return ret};MetaLib.prototype.isTagAttrTranslatable=function(tag,attr){var member=this._getTagAttrMemberObj(tag,attr);return member?this._isSubStateTranslatable(member):this._components.isTagAttrTranslatable(tag,attr)};MetaLib.prototype.isTagAttrReadOnly=function(tag,attr){var o,ret=false;tag=_removeChevrons(tag);if(o=this._getTagAttrMemberObj(tag,attr)){ret=o&&o.readonly}else if(this._components){ret=this._components.isTagAttrReadOnly(tag,attr)}return ret};MetaLib.prototype.isTagAttrWriteback=function(tag,attr){var o,ret=false;tag=_removeChevrons(tag);if(o=this._getTagAttrMemberObj(tag,attr)){ret=o&&o.ojwriteback}else if(this._components){ret=this._components.isTagAttrWriteback(tag,attr)}return ret};MetaLib.prototype.hasTagDataOjCommand=function(tagName){var obj,ret=false,compName,containers,indexes,i;tagName=_removeChevrons(tagName);obj=this._getComponentFromTag(tagName);if(obj){compName=this._getComponentNameFromTag(tagName);indexes=this._json.dataOjCommand;if(indexes){containers=this._json.ojStyles.containers;for(i=0;i<indexes.length;i++){if(containers[indexes[i]]===compName){ret=true;break}}}}return ret};MetaLib.prototype.isTagEvent=function(tagName,eventName){var obj,attr,x,evName,ret=false;eventName=eventName.charAt(0)===":"?eventName.substring(1):eventName;evName=eventName.includes("-")?eventName:this._domUtils.kebabCase(eventName);if(!eventName.startsWith(EVENT_ON)){return ret}if(this.isWCTag(tagName)){if(this._getComponentNameFromTag(tagName)){obj=this._getComponentFromTag(_removeChevrons(tagName));if(this._curFileType===FT_TSX){if(!(evName=this._transformTsxLegacyTagEvent(eventName))){return false}}if(obj&&obj.htmlevents){ret=!!obj.htmlevents[evName]}if(!ret){if((x=evName.lastIndexOf(DASH_CHANGED))>=0){attr=evName.substring(3,x);attr=this._domUtils.camelCase(attr);ret=!!obj.member[attr]}}}else{ret=this._components&&this._components.isTagEvent(tagName,eventName)}if(!ret){ret=HtmlUtils.isCommonEventAttr(eventName)}}return ret};MetaLib.prototype._transformTsxLegacyTagEvent=function(eventName){var evName;if(eventName.startsWith("on")){let c,i=2;if(eventName.substring(2,4)==="oj"){i=4}c=eventName.charAt(i).toUpperCase();i++;evName=this._domUtils.kebabCase("on"+(i>4?"Oj":"")+c+eventName.substring(i))}return evName};MetaLib.prototype.isTagStatus=function(tag,statType){var clazz,ret;if(clazz=this._getComponentNameFromTag(_removeChevrons(tag))){let stats,status;if(stats=clazz?.header?.ojdeprecated){for(i=0;i<status.length;i++){status=stats[i];if(status.type===statType||statType===DEPRECATED&&!status.hasOwnProperty("type")){ret=true;break}}}}else{ret=this._components.isTagStatus(tag,statType)}return!!ret};MetaLib.prototype.getTagStatus=function(tag,statType){var clazz,ret=null;if(statType&&!this._isTagStatusType(statType)){return null}if(!(clazz=this._getComponentNameFromTag(_removeChevrons(tag)))){return this._components.getTagStatus(tag,statType)}if(clazz==="oj.ojTree"){if(SemVer.gte(this._jetVer,"5.2.0")){return null}else{if(statType===DEPRECATED){return[{type:DEPRECATED,description:"Use <oj-tree-view> instead"}]}else if(statType===SUPERSEDES){return[{type:SUPERSEDES,description:"Superseded by <oj-tree-view>"}]}return null}}let obj=this._json[clazz];if(obj&&obj.header){let arStat,omitted=statType===undefined;if(Array.isArray(arStat=obj.header.ojdeprecated)){let stat,i,stType;for(i=0;i<arStat.length;i++){stat=arStat[i];if(!(stType=stat.type)){stType=DEPRECATED}if(omitted||stType===statType){if(!ret){ret=[]}ret.push(obj={type:stType});if(stat.hasOwnProperty("target")){obj.target=stat.target}if(stat.hasOwnProperty("value")){obj.value=stat.value}if(stat.hasOwnProperty("since")){obj.since=stat.since}if(stat.hasOwnProperty("description")){obj.description=stat.description}if(stType===ANTIPATTERN&&stat.hasOwnProperty("themes")){ret.themes=stat.themes}this._handleStatusFor(stat,stType,ret)}}}else if(typeof arStat===STRING){ret=[{description:arStat}]}}return ret};MetaLib.prototype._isTagStatusType=function(type){return type===DEPRECATED||type===MAINTENANCE||type===SUPERSEDES||type===ANTIPATTERN};MetaLib.prototype.getPropStatus=function(tagName,propName,statType){var clazz,prop,propName2,status,ret;var omitted=statType===undefined;if(statType&&!this._isTagStatusType(statType)){return null}propName=propName.charAt(0)===":"?propName.substring(1):propName;if(clazz=this._getComponentNameFromTag(_removeChevrons(tagName))){let obj=this._json[clazz];if(this._curFileType===FT_TSX){if(obj.member){propName2=obj.member[propName]}}else if(obj.htmlattributes){propName2=obj.htmlattributes[propName]}if(!propName2){return null}if(obj&&obj.member&&(prop=obj.member[propName2])){if(status=prop.ojdeprecated){let i;for(i=0;i<status.length;i++){let stat,stType,o;stat=status[i];if(!(stType=stat.type)){stType=DEPRECATED}if(omitted||stType===statType){if(!ret){ret=[]}o={type:stType};if(stat.hasOwnProperty("target")){o.target=stat.target}if(stat.hasOwnProperty("value")){o.value=stat.value}if(stat.hasOwnProperty("since")){o.since=stat.since}if(stat.hasOwnProperty("description")){o.description=stat.description}if(type===ANTIPATTERN&&stat.hasOwnProperty("themes")){o.themes=stat.themes}this._handleStatusFor(stat,stType,o);ret.push(o)}}}}}else{propName2=this._curFileType===FT_TSX?propName:this._domUtils.camelCase(propName);ret=this._components.getPropStatus(tagName,propName2,statType)}return ret?ret:null};MetaLib.prototype._handleStatusFor=function(stat,stType,obj){if(stType===ANTIPATTERN){if(stat.hasOwnProperty("for")&&obj.target===STATUS_PROP_VALUE){obj.value=stat.for}}else if(stType===DEPRECATED&&stat.hasOwnProperty("for")){if(obj.target===STATUS_PROP_VALUE||obj.target===STATUS_PROP_TYPE){obj.value=stat.for}}else if(stType===MAINTENANCE||stType===SUPERSEDES){if(stat.hasOwnProperty("for")){obj.value=stat.for}}};MetaLib.prototype.applySchema=function(obj){return this._compSvcs.validateComponentJsonWithSchema(obj)};MetaLib.prototype.walkElemStackForOJTag=function(ctx,excludeBindIf){var i,name,ret=null;var stack=ctx.elemStack;if(stack&&stack.length){for(i=stack.length-1;i>=0;i--){name=stack[i].name;if(name.toLowerCase().startsWith(OJPREFIX)){if(!name.startsWith("oj-bind-")||!excludeBindIf){ret=name;break}}}}return ret};MetaLib.prototype.walkDomStackForOJTag=function(ctx,excludeBindIf){return this.walkElemStackForOJTag(ctx,excludeBindIf)};MetaLib.prototype.getPublicInterface=function(){return{isJetTag:this.isJetTag.bind(this),isWCTag:this.isWCTag.bind(this),isComponentTag:this.isComponentTag.bind(this),isJetCoreTag:this.isJetCoreTag.bind(this),isCoreTag:this.isCoreTag.bind(this),isJetLegacyTag:this.isJetLegacyTag.bind(this),isTagDeprecated:this.isTagDeprecated.bind(this),isTagSupportedInTheme:this.isTagSupportedInTheme.bind(this),isAttrSupportedInTheme:this.isAttrSupportedInTheme.bind(this),isTagAttrDeprecated:this.isTagAttrDeprecated.bind(this),isTagAttrTranslatable:this.isTagAttrTranslatable.bind(this),isTagAttrReadOnly:this.isTagAttrReadOnly.bind(this),isTagAttrEnumValueDeprecated:this.isTagAttrEnumValueDeprecated.bind(this),isTagAttr:this.isTagAttr.bind(this),isJetTagAttr:this.isJetTagAttr.bind(this),hasTagAttrValues:this.hasTagAttrValues.bind(this),isTagAttrValue:this.isTagAttrValue.bind(this),getTagAttrType:this.getTagAttrType.bind(this),getTagAttrTypeEx:this.getTagAttrTypeEx.bind(this),getAllCustomMetadata:this.getAllCustomMetadata.bind(this),getTagMetadata:this.getTagMetadata.bind(this),getTagPropMetadata:this.getTagPropMetadata.bind(this),getOjcMetadataByPath:this.getOjcMetadataByPath.bind(this),getAllPackMetadata:this.getAllPackMetadata.bind(this),getPackMetadata:this.getPackMetadata.bind(this),getPackPaths:this.getPackPaths.bind(this),getAllResourceMetadata:this.getAllResourceMetadata.bind(this),getResourceMetadata:this.getResourceMetadata.bind(this),getResourcePaths:this.getResourcePaths.bind(this),isTagCompProp:this.isTagCompProp.bind(this),hasTagCompPropSubprop:this.hasTagCompPropSubprop.bind(this),getTagPropType:this.getTagPropType.bind(this),hasTagSlot:this.hasTagSlot.bind(this),hasTagDefaultSlot:this.hasTagDefaultSlot.bind(this),isTagSlotName:this.isTagSlotName.bind(this),isTagSlotValue:this.isTagSlotValue.bind(this),isTagSlotDeprecated:this.isTagSlotDeprecated.bind(this),getPreferredSlotContent:this.getPreferredSlotContent.bind(this),getPreferredSlotContentEx:this.getPreferredSlotContentEx.bind(this),getTagSlotMetadata:this.getTagSlotMetadata.bind(this),hasTagDataOjCommand:this.hasTagDataOjCommand.bind(this),isBindingTag:this.isBindingTag.bind(this),isTagAttrWriteback:this.isTagAttrWriteback.bind(this),isTagPackPrivate:this.isTagPackPrivate.bind(this),isTagStatus:this.isTagStatus.bind(this),getTagStatus:this.getTagStatus.bind(this),getPropStatus:this.getPropStatus.bind(this),isClass:this.isClass.bind(this),isClassRenamed:this.isClassRenamed.bind(this),isClassDeleted:this.isClassDeleted.bind(this),isClassDeprecated:this.isClassDeprecated.bind(this),isClassMethodDeleted:this.isClassMethodDeleted.bind(this),isClassMemberDeleted:this.isClassMemberDeleted.bind(this),isClassMethodDeprecated:this.isClassMethodDeprecated.bind(this),isClassMemberDeprecated:this.isClassMemberDeprecated.bind(this),isClassAttrDeprecated:this.isClassAttrDeprecated.bind(this),isClassFinal:this.isClassFinal.bind(this),isClassMethod:this.isClassMethod.bind(this),isClassMethodStatic:this.isClassMethodStatic.bind(this),isClassMember:this.isClassMember.bind(this),isClassMemberStatic:this.isClassMemberStatic.bind(this),getClassMethodScope:this.getClassMethodScope.bind(this),getStyleOrigin:this.getStyleOrigin.bind(this),isJetStyle:this.isJetStyle.bind(this),isCustomStyle:this.isCustomStyle.bind(this),isTagStyle:this.isTagStyle.bind(this),isStyle:this.isStyle.bind(this),isGenStyle:this.isGenStyle.bind(this),isClassStyle:this.isClassStyle.bind(this),isStylesetStyle:this.isStylesetStyle.bind(this),isStyleDeprecated:this.isStyleDeprecated.bind(this),isStyleDeprecatedEx:this.isStyleDeprecatedEx.bind(this),getStyleSelector:this.getStyleSelector.bind(this),getNonSSStyleElems:this.getNonSSStyleElems.bind(this),isJetStylePrefix:this.isJetStylePrefix.bind(this),hasJetStylePrefixes:this.hasJetStylePrefixes.bind(this),isTagEvent:this.isTagEvent.bind(this),isTagEventDeprecated:this.isTagEventDeprecated.bind(this),getTagPropertyFromEvent:this.getTagPropertyFromEvent.bind(this),getTagsFromStyle:this.getTagsFromStyle.bind(this),getJetTagFromStyle:this.getJetTagFromStyle.bind(this),getJetTagsFromStyle:this.getJetTagsFromStyle.bind(this),getClassesFromStyle:this.getClassesFromStyle.bind(this),getClassFromTag:this.getClassFromTag.bind(this),getClassFromModule:this.getClassFromModule.bind(this),getTagFromClass:this.getTagFromClass.bind(this),getDeprecatedMethodList:this.getDeprecatedMethodList.bind(this),getDeprecatedMemberList:this.getDeprecatedMemberList.bind(this),getDeletedMethodList:this.getDeletedMethodList.bind(this),getDeletedMemberList:this.getDeletedMemberList.bind(this),getRequiredAttrs:this.getRequiredAttrs.bind(this),isComponent:this.isComponent.bind(this),isNamespaceTag:this.isNamespaceTag.bind(this),isNSRegistered:this.isNSRegistered.bind(this),isNamespacePrefix:this.isNamespacePrefix.bind(this),isRuleIgnored:this.isRuleIgnored.bind(this),getRenamedClassList:this.getRenamedClassList.bind(this),getDeletedClassList:this.getDeletedClassList.bind(this),processImplements:this.processImplements.bind(this),isInterfaceImplemented:this.isInterfaceImplemented.bind(this),getInterfaces:this.getInterfaces.bind(this),getImplementers:this.getImplementers.bind(this),getSubcomponentType:this.getSubcomponentType.bind(this),getWCInterfaces:this.getWCInterfaces.bind(this),hasWCInterfaces:this.hasWCInterfaces.bind(this),hasJetWCInterfaces:this.hasJetWCInterfaces.bind(this),getMetaVers:this.getMetaVers.bind(this),walkElemStackForOJTag:this.walkelemStackForOJTag,walkDomStackForOJTag:this.walkDomStackForOJTag,isIgnoreAttr:this.isIgnoreAttr.bind(this),applySchema:this.applySchema.bind(this),getRevisionInfo:this.getRevisionInfo.bind(this),_getObjectMetadata:this._getObjectMetadata.bind(this)}};MetaLib.prototype.loadMeta=function(metaFile){var metaObj,ret=false;if(!this._json){try{if(metaObj=this._nd.metaLoader.loadMeta(metaFile,this._nd,this._fsUtils)){this._json=metaObj.meta;this._delHist=metaObj.delMeta;this._renHist=metaObj.renMeta;this._reqAttrs=metaObj.reqattr;this._jetVerRaw=this._json.meta.jetversion;this._jetVer=_removeJetVerExtension(this._jetVerRaw);this._metaCommonAnalysis();ret=true}else{this._error(`Metadata '${metaFile}' not found!`)}}catch(e){this._error(`[${e.name}]: Metadata load (${metaFile}) - ${e.message}`)}}return ret};MetaLib.prototype.getNonLegacyMaintenanceTags=function(){return this._components.getMaintenanceTags()};MetaLib.prototype.getRenamedClassList=function(){return this._renHist};MetaLib.prototype.getDeletedClassList=function(){return this._delHist};MetaLib.prototype.processImplements=function(tag,impls){if(Array.isArray(impls)&&this._implements){impls.forEach(impl=>{if(this._implements[impl]){this._implements[impl].push(tag)}else{this._implements[impl]=[tag]}})}};const OJV_CHARS=/[<>]/;MetaLib.prototype._getOjValues=function(mem){var ts,ret;if(!mem){return false}if(mem.ojvalues){if(mem.ojvalues.name&&Array.isArray(mem.ojvalues.name)&&mem.ojvalues.name.length){return mem.ojvalues}return}if(mem.tstype&&mem.tstype.m_ojvalues){return mem.tstype.m_ojvalues}ts=this._getTsTypeObject(mem);if(ts&&ts.ojvalues&&ts.ojvalues.name){if(Array.isArray(ts.ojvalues.name)&&ts.ojvalues.name.length){ret=ts.ojvalues}}return ret};MetaLib.prototype.getImplementers=function(ifc){var ret;if(this._implements&&ifc){ret=this._implements[ifc]}return ret||null};MetaLib.prototype.getInterfaces=function(tag){var obj,hdr,impls,ret;if(!tag){return null}tag=_removeChevrons(tag);if(this.isJetLegacyTag(tag)){if(obj=this._getComponentFromTag(tag)){if(hdr=obj.header){if(hdr.domInterface&&hdr.customelement){impls=hdr.domInterface;ret=Array.isArray(impls)?impls:[impls]}}}}else if(this.isComponentTag(tag)||this.isJetCoreTag(tag)){ret=this._components.getInterfaces(tag)}return ret||null};MetaLib.prototype.getWCInterfaces=function(){return this._implements};MetaLib.prototype.hasJetWCInterfaces=function(){return this._hasJetWCIFCs};MetaLib.prototype.hasWCInterfaces=function(){return!!this._implements};MetaLib.prototype.isInterfaceImplemented=function(tag,ifcName){var ifc,ret;if(ifc=this.getInterfaces(tag)){for(let i=0;i<ifc.length;i++){if(ifc[i]===ifcName){ret=true;break}}}return!!ret};MetaLib.prototype.getSubcomponentType=function(tag){var obj,hdr,ret;if(tag=_removeChevrons(tag)){if(this.isJetTag(tag)){if(obj=this._getComponentFromTag(tag)){if(hdr=obj.header){ret=hdr.ojsubcomponenttype}}}else if(this.isComponentTag(tag)){ret=this._components.getSubcomponentType(tag)}}return ret||null};MetaLib.prototype._createNonClassList=function(mp){this._nonClasses=mp.nonClasses?mp.nonClasses:["genericStyles","ojStyles"];this._nonClasses.push("moduleLookup");this._nonClasses.push("newGenericStyles");this._nonClasses.push("newOjStyles");if(!this._nonClasses.includes("custElementClassLookup"))this._nonClasses.push("custElementClassLookup");if(!this._nonClasses.includes("meta"))this._nonClasses.push("meta");if(!this._nonClasses.includes("ResponsivePrefixes"))this._nonClasses.push("ResponsivePrefixes")};MetaLib.prototype.setAmdMeta=function(obj){this._json=obj.jetMeta.meta;this._delHist=obj.jetMeta.delMeta;this._reqAttrs=obj.jetMeta.reqattr;this._jetVerRaw=this._json.meta.jetversion;this._jetVer=_removeJetVerExtension(this._jetVerRaw);this._metaCommonAnalysis();return true};MetaLib.prototype._metaCommonAnalysis=function(){this._createNonClassList(this._json.meta);this._createModuleLookup();this._createClassNameChanges();this._fixup_jet_42315();this._createImplements()};MetaLib.prototype.setTheme=function(theme){this._theme=theme};MetaLib.prototype._createModuleLookup=function(){var comps,compName,lookup,hdr;if(this._json.moduleLookup){return}this._json.moduleLookup=lookup={};comps=this._json;for(compName in comps){if(!this._nonClasses.includes(compName)&&!compName.startsWith("oj.__")){hdr=comps[compName].header;if(hdr){lookup[OJS+hdr.name.toLowerCase()]=compName}}}};MetaLib.prototype._createClassNameChanges=function(){var comps,compName,o,hdr;if(this._classChange=this._json.meta.isClassNameChanges){return}this._classChange=o={};comps=this._json;for(compName in comps){if(!this._nonClasses.includes(compName)){hdr=comps[compName].header;if(hdr&&compName!==hdr.name){o[hdr.name]=compName}}}this._json.meta.isClassNameChanges=true};MetaLib.prototype._fixup_jet_42315=function(){var o;if(SemVer.gte(this._jetVer,"8.0.0")){if(o=this._json.Color||this._json["oj.Color"]||this._json["oj.ojColor"]){if(!o.header){o.header={}}o.header.readonly=true}}};MetaLib.prototype._createImplements=function(){var clazzes,clazz,tag,impls,impl,o={},a,hdr;if(this._implements=this._json.meta.interfaces){return}clazzes=this._json;for(clazz in clazzes){if(this._nonClasses.includes(clazz)){continue}if(hdr=clazzes[clazz].header){if(hdr.domInterface&&hdr.customelement){impls=hdr.domInterface;impls=Array.isArray(impls)?impls:[impls];for(impl of impls){if(o[impl]){a=o[impl]}else{o[impl]=a=[]}this._hasJetWCIFCs=true;tag=this.getTagFromClass(clazz);if(tag&&!a.includes(tag)){a.push(tag)}}}}}this._implements=this._hasJetWCIFCs?o:null};MetaLib.prototype.getMetaVers=function(){return{versions:this._jetVersions,runver:this._jetVer}};MetaLib.prototype.setComponentsLib=function(compSvcs,comps){if(compSvcs){this._compSvcs=compSvcs}if(comps){this._components=comps}};MetaLib.prototype.setStylesets=function(ss){if(!ss){return}var o,obj,e,i;if(!this._stylesets){this._stylesets=obj={}}else{obj=this._stylesheets}for(i=0;i<ss.length;i++){o=ss[i];if(typeof o===STRING){obj[o]=true}else if(o.deprecated){obj[o.deprecated]=e={};if(o.since){e.since=o.since}if(o.note){e.description=o.note}else if(o.description){e.description=o.description}}}};MetaLib.prototype.setDomUtils=function(du){this._domUtils=du};MetaLib.prototype.getDomUtils=function(){return this._domUtils};MetaLib.prototype.setCurFileType=function(ft){this._curFileType=ft&&ft.startsWith(DOT)?ft.substring(1):ft;this._components.setCurFileType(this._curFileType)};MetaLib.prototype.getRevisionInfo=function(){var metaSect=this._json.meta;var revision="";var x;return{revision:revision,tag:metaSect.jetrevision,jetVersionRaw:metaSect.jetversion,jetVersion:(x=metaSect.jetversion.indexOf("-"))>=0?metaSect.jetversion.substring(0,x):metaSect.jetversion,date:metaSect.date,time:metaSect.time}};MetaLib.prototype._isSubStateDeprecated=function(obj,isMember){var depr,retStatus=null;if(obj&&obj.ojdeprecated&&obj.ojdeprecated.length){retStatus=this._createLegacyDeprecatedStatus(obj.ojdeprecated,isMember)}else if(depr=obj.deprecated){retStatus=typeof depr===BOOLEAN?NO_SUGGESTION_AVAIL:depr;retStatus=[{type:DEPRECATED,description:retStatus}]}return retStatus};MetaLib.prototype._isSubStateTranslatable=function(obj){return obj&&obj.ojtranslatable};MetaLib.prototype._createLegacyDeprecatedStatus=function(depr,isMember){var retStatus,depr,o;if(depr){depr.forEach(status=>{if(status.type&&status.type!==DEPRECATED){return}retStatus=[];o={type:DEPRECATED};if(status.hasOwnProperty("target")){o.target=status.target;if(isMember&&status.target==="memberType"){if(status.value&&status.value.length>1){o.target="propertyValue";o.value=[];status.value.forEach((elem,x)=>{if(x){if(elem.startsWith("'")||elem.startsWith("\"")){elem=elem.substring(1,elem.length-1)}o.value.push(elem)}})}else{o.target="propertyType"}}}if(status.hasOwnProperty("description")){o.description=status.description}if(status.hasOwnProperty("since")){o.since=status.since}if(status.hasOwnProperty("for")){o.value=[status.for]}else if(!o.value&&status.hasOwnProperty("value")){o.value=status.value}retStatus.push(o)})}return retStatus&&retStatus.length?retStatus:null};MetaLib.prototype._getComponentNameFromTag=function(tagName){var ret;if(tagName){tagName=tagName.toLowerCase();ret=this._json.custElementClassLookup[tagName]?this._json.custElementClassLookup[tagName]:null}else{ret=false}return ret};MetaLib.prototype.isIgnoreAttr=function(tagName,attrName){var ret=false;attrName=attrName.toLowerCase();attrName=attrName.charAt(0)===":"?attrName.substr(1):attrName;if(HtmlUtils.isCommonElem(attrName)||attrName.startsWith("aria-")){return true}if(tagName==="oj-avatar"){if(attrName==="src"||attrName==="initials")ret=true}else if(tagName==="oj-option"){if(attrName==="value")ret=true}return ret};MetaLib.prototype.getDeprecatedMethodList=function(){if(this._deprecatedMethods){return this._deprecatedMethods}var json=this._json;var name,methName,methObj,depMeth,o,a;var ret={};for(name in json){o=json[name];if(o&&o.function){for(methName in o.function){methObj=o.function[methName];depMeth=methObj.ojdeprecated;if(depMeth&&(!depMeth.type||depMeth.type==="deprecated")){if(ret[methName]){a=ret[methName]}else{ret[methName]=a=[]}a.push(name)}}}}return this._deprecatedMethods=ret};MetaLib.prototype.getDeprecatedMemberList=function(){if(this._deprecatedMembers){return this._deprecatedMembers}var json=this._json;var name,memName,memObj,depMem,o,a;var ret={};for(name in json){o=json[name];if(o&&o.member){for(memName in o.member){memObj=o.member[memName];depMem=memObj.ojdeprecated;if(depMem&&(!depMem.type||depMem.type==="deprecated")){if(ret[memName]){a=ret[memName]}else{ret[memName]=a=[]}a.push(name)}}}}return this._deprecatedMembers=ret};MetaLib.prototype.getDeletedMethodList=function(){if(this._deletedMethods){return this._deletedMethods}var json=this._delHist;var name,methName,ver,o,a;var ret={};if(json){for(name in json){o=json[name];if(o&&o.methods){for(methName in o.methods){ver=o.methods[methName];if(ret[methName]){a=ret[methName]}else{ret[methName]=a=[]}a.push(name);a.push(ver)}}}}return this._deletedMethods=ret};MetaLib.prototype.getDeletedMemberList=function(){if(this._deletedMembers){return this._deletedMembers}var json=this._delHist;var name,memName,ver,o,a;var ret={};if(json){for(name in json){o=json[name];if(o&&o.members){for(memName in o.members){ver=o.members[memName];if(ret[memName]){a=ret[memName]}else{ret[memName]=a=[]}a.push(name);a.push(ver)}}}}return this._deletedMembers=ret};MetaLib.prototype._getSlots=function(tagName){var obj=this._getComponentFromTag(_removeChevrons(tagName));return this._getSlots2(obj)};MetaLib.prototype._getSlots2=function(base){var bases,base,i,ret=null;while(base){ret=base&&base.slot?base.slot:null;if(ret){break}bases=base.header&&base.header.augments?base.header.augments:null;if(!bases){break}for(i=0;i<bases.length;i++){base=this._json[bases[i]];ret=this._getSlots2(base);if(ret){base=null;break}}}return ret?ret:null};MetaLib.prototype._getSlotByName=function(base,slotName){var ret=null;while(base){if(!slotName){ret=base&&base.member?base.member.Default&&base.member.Default.ojchild:null}else{if(base&&base.slot){ret=base.slot[slotName]}}break}return ret?ret:null};MetaLib.prototype._getComponentFromTag=function(tagName){var o=this._getComponentNameFromTag(tagName);if(o){o=this._json[o]}return o?o:null};function _getStyleIndices(scope,styleName){var a,n,ret,i;a=scope[styleName];if(a||a===0){if(!ret){ret=[]}if(Array.isArray(a)){for(i=0;i<a.length;i++){n=a[i];if(typeof n===OBJECT){n=a[i].index}ret.push(n)}}else{if(typeof a===OBJECT){n=a.index}else{n=a}ret.push(n)}}return ret&&ret.length?ret:null};MetaLib.prototype.getNonSSStyleElems=function(styleName,scope){var a,n,ret,i;scope=scope?this._json.ojStyles:this._json.genericStyles;a=scope[styleName];if(a||a===0){if(!ret){ret=[]}if(Array.isArray(a)){for(i=0;i<a.length;i++){n=a[i];if(typeof n===OBJECT&&!n.styleselector){n=a[i].index}ret.push(n)}}else{if(typeof a===OBJECT&&!a.styleselector){n=a.index}else{n=a}ret.push(n)}}return ret&&ret.length?_toContainers(scope,ret,this._json):null};MetaLib.prototype.displayImpls=function(){var impls,impl;this._console("[info] :--------- JET Interfaces Implemented ---------","I");if(!(impls=this._implements)){this._console(" None!","I")}else{for(impl in impls){this._console(`${impl} : <- <${impls[impl].join(",")}>`,"I")}}this._console("[info]: -------- End Declared Web Components ---------\n","I")};function _removeJetVerExtension(ver){let x=ver.indexOf("-");return x>=0?ver.substring(0,x):ver};function _toContainers(scope,indices,json){var cont,ret,clazz,elem,n,i;cont=scope.containers;for(i=0;i<indices.length;i++){n=indices[i];if(n>=0){if(!ret){ret=[]}if(!json){ret[i]=cont[n]}else{clazz=cont[n];elem=json[clazz];if(elem&&elem.header){elem=elem.header.customelement;if(elem){ret[i]=elem}}}}}return ret&&ret.length?ret:null};function _convertValue(valType,value){var retValue=value;if(valType===STRING){retValue=value}else if(valType==="number"){retValue=Number(value)}else if(valType==="boolean"){retValue=value.toLowerCase()==="true"}return retValue};function _removeChevrons(tagName){if(tagName){let len=tagName.length-1;let start=tagName.charAt(0)==="<"?1:0;let end=tagName.charAt(len)===">"?len:++len;tagName=tagName.substring(start,end)}return tagName};module.exports=MetaLib;
6
+ "use strict";const Namespaces=require("./ns");const HtmlUtils=require("./HtmlUtils");const SemVer=require("semver");const NO_SUGGESTION_AVAIL="No suggestion available.";const OJPREFIX="oj-";const OJS="ojs/oj";const EVENT_ON="on";const DOT=".";const DATA_OJ_CMD="data-oj-command";const DASH_CHANGED="-changed";const CHANGED="Changed";const PROP_SLOTS="slots";const PROP_PROPS="props";const PROP_EVENTS="events";const PROP_IMPLEMENTS="implements";const PROP_FOLDER="folder";const PROP_VERSION="version";const PROP_UNSUP_THEME="unsupTheme";const PROP_SUBCOMPONENT_TYPE="subcomponentType";const PACK_PRIVATE="packPrivate";const ANTIPATTERN="antiPattern";const DEPRECATED="deprecated";const MAINTENANCE="maintenance";const SUPERSEDES="supersedes";const STATUS_PROP_TYPE="propertyType";const STATUS_PROP_VALUE="propertyValue";const FT_TSX="tsx";const STRING="string";const BOOLEAN="boolean";const OBJECT="object";function MetaLib(nd,runMode,msgCtx,utils,fsUtils){this._json=null;this._delHist=null;this._renHist=null;this._reqAttrs=null;this._nonClasses=null;this._implements=null;this._hasJetWCIFCs=false;this._components=null;this._compSvcs=null;this._stylesets=null;this._runMode=runMode;this._utils=utils;this._fsUtils=fsUtils;this._domUtils=null;if(nd.jetver){this._jetVersions=nd.jetver.getVersions()}this._jetVer=null;this._theme=null;this._curFileType=null;this._deprecatedMethods=null;this._deprecatedMembers=null;this._deletedMethods=null;this._deletedMembers=null;this._error=msgCtx.error;this._debug=msgCtx.debug;this._info=msgCtx.info;this._msg=msgCtx.msg;this._console=msgCtx.console;this._isDebug=msgCtx.isdebug;this._isVerbose=msgCtx.isVerbose;this._nd=nd};MetaLib.prototype.isNSRegistered=function(prefix){return Namespaces.has(prefix)};MetaLib.prototype.isNamespaceTag=function(tagName){var s=tagName.replace(/[<>]/g,"");var x,ret=false;if(tagName.startsWith("demo-")||tagName.startsWith("my-")||tagName.startsWith("ns-")){return true}while(true){x=s.lastIndexOf("-");if(x>=0){s=s.substring(0,x);if(s.lastIndexOf("-")<0&&s==="oj"){break}if(Namespaces.has(s)){ret=true;break}}else{break}}if(!ret&&this.isJetTag(tagName)){ret=true}return ret};MetaLib.prototype.isNamespacePrefix=function(tagName){return this.isNamespaceTag(tagName)};MetaLib.prototype.isRuleIgnored=function(tagName,ruleName){var o,ret=false;if(o=this._getComponentFromTag(tagName)){if(o.extension&&o.extension.audit&&o.extension.audit.ignore){let ar=o.extension.audit.ignore;if(ar&&ar.length){ret=ar.includes(ruleName)}}}else{ret=this._components&&this._components.isRuleIgnored(tagName,ruleName)}return ret};MetaLib.prototype.isJetCoreTag=function(tag){return!!this._components.isJetCoreTag(tag)};MetaLib.prototype.isCoreTag=function(tag){return this.isJetCoreTag(tag)};MetaLib.prototype.isJetLegacyTag=function(tag){return this._getComponentNameFromTag(_removeChevrons(tag))};MetaLib.prototype.isJetTag=function(tagName){return!!(this._components.isJetCoreTag(tagName)||this.isJetLegacyTag(tagName))};MetaLib.prototype.isComponentTag=function(tagName){return tagName?this._components&&this._components.isUserTag(_removeChevrons(tagName)):false};MetaLib.prototype.isWCTag=function(tagName){var ret=false;if(tagName){tagName=_removeChevrons(tagName);ret=this._getComponentNameFromTag(tagName)||this._components&&this._components.isKnownTag(tagName)}return ret};MetaLib.prototype.isCCATag=function(tagName){return tagName?this.isWCTag(tagName):false};MetaLib.prototype.isVComponentTag=function(tagName){return tagName?this._components.isVComponentTag(tagName):false};MetaLib.prototype.isTagDeprecated=function(tagName){var clazz,ret;if(clazz=this._getComponentNameFromTag(_removeChevrons(tagName))){ret=this.isClassDeprecated(clazz)}else{ret=this._components.isTagDeprecated(tagName)}return ret};MetaLib.prototype.isTagAttrDeprecated=function(tagName,attrName){var member,ret=null;if(!attrName){return null}member=this._getTagAttrMemberObj(tagName,attrName);ret=member?this._isSubStateDeprecated(member,true):this._components.isTagAttrDeprecated(tagName,attrName);if(ret){ret.forEach(status=>{if(status.description){status.description=HtmlUtils.replaceEntities(status.description)}})}return ret};MetaLib.prototype.isTagEventDeprecated=function(tag,attr){var comp,member,ev,deps,retStatus=null;if(comp=this._getComponentFromTag(tag)){if(!comp.event&&!comp.member){return null}if(ev=this._getLegacyEventName(comp,attr)){if(comp.event&&(member=comp.event[ev])||comp.htmlattributes&&(member=comp.member[ev])){if(deps=member.ojdeprecated){if(deps.length){retStatus=this._createLegacyDeprecatedStatus(deps,true)}}}}}else{retStatus=this._components.isTagEventDeprecated(tag,attr)}return retStatus};MetaLib.prototype._getLegacyEventName=function(comp,eventName){var event,ev;if(!eventName.includes("-")){eventName=this._domUtils.kebabCase(eventName)}if(comp.htmlevents&&(ev=comp.htmlevents[eventName])||eventName.endsWith(DASH_CHANGED)&&(ev=comp.htmlattributes[eventName])){if(!(comp.event&&comp.event[ev])){if(ev.endsWith(CHANGED)){ev=ev.substring(0,ev.length-CHANGED.length)}}}return ev?ev:null};MetaLib.prototype.getTagPropertyFromEvent=function(tagName,eventName){var comp,ev;if(comp=this._getComponentFromTag(tagName)){ev=this._getLegacyEventName(comp,eventName)}else{if(ev=this._components.getTagPropertyFromEvent(tagName,eventName)){ev=ev.name}}return ev?ev:null};MetaLib.prototype.isTagAttr=function(tagName,attrName){var o,ret=false;if(!attrName){return false}attrName=attrName.charAt(0)===":"?attrName.substring(1):attrName;if(o=this._getComponentFromTag(tagName)){ret=this.isJetTagAttr(o,attrName)}else{ret=this._components&&this._components.isTagAttr(tagName,attrName)}return ret};MetaLib.prototype.isJetTagAttr=function(tagObj,attrName){var ret;if(!attrName){return false}attrName=attrName.charAt(0)===":"?attrName.substring(1):attrName;ret=this._curFileType===FT_TSX?tagObj.member&&tagObj.member[attrName]:tagObj.htmlattributes&&tagObj.htmlattributes[attrName];if(!ret&&attrName===DATA_OJ_CMD&&tagObj.member){ret=tagObj.member[DATA_OJ_CMD]}return!!ret};MetaLib.prototype._getTagAttrMemberObj=function(tagName,attrName){var obj,attrib,member,x;if(!attrName){return null}obj=this._getComponentFromTag(_removeChevrons(tagName));attrName=attrName.charAt(0)===":"?attrName.substring(1):attrName;if(this._curFileType===FT_TSX){attrName=this._domUtils.kebabCase(attrName)}if(!obj||!obj.htmlattributes||!obj.htmlattributes[attrName]){return null}member=null;attrib=obj.htmlattributes[attrName];if(attrib){x=attrib.indexOf(DOT);if(x>=0){if(obj.member){member=this._findSubMember(obj,obj.member,attrib,attrib)}}else{member=obj.member[attrib];if(member){return member}}}return member};MetaLib.prototype._findSubMember=function(obj,mem,attrName,subMemberPart){var member,ts,sm,rest,x,ret=null;x=subMemberPart.indexOf(DOT);if(x>=0){sm=subMemberPart.substring(0,x);rest=subMemberPart.substring(x+1)}else{sm=subMemberPart;rest=null}for(member in mem){member=mem[member];if(member.name===attrName&&!rest){ret=member;break}if(member.name!==sm){continue}if(!rest){ret=member;break}if(member.submember){ret=this._findSubMember(obj,member.submember,attrName,rest);if(ret){break}}else if(member.tstype){ts=this._getTsTypeObject(member);if(ts){ret=this._findSubMember(obj,ts.member,attrName,rest);if(ret){break}}}if(ret){break}}return ret};MetaLib.prototype._getTsTypeObject=function(mem){var ts,o,s,x;ts=mem.tstype;if(ts&&ts.target==="Type"&&typeof ts.value===STRING){s=ts.value;s=s.replace("=","");x=s.indexOf("|");if(x>=0){s=s.substring(0,x).trimRight()}if(s.charAt(s.length-1)===">"){x=s.lastIndexOf("<");if(s>=0){s=s.substring(0,x)}}o=this._json[s];if(!o){o=this._json[mem.memberof];if(o.typedef){s=ts.value;x=s.lastIndexOf(DOT);if(x>=0){s=s.substring(x+1);o=o.typedef[s]}}}}return o?o:null};MetaLib.prototype._getSubMemberPart=function(fullAttr,soFar){var s,x;s=fullAttr.replace(soFar,"");if(s.length){if(s.charAt(0)==="."){x=s.indexOf(DOT,1);if(x>=0){s=soFar+s.substring(0,x)}else{s=soFar+s}}}else{s=soFar}return s};MetaLib.prototype._handleAttrObject=function(member){var link,types,i,x;types=member.tstype;if(types){for(i=0;i<types.length;i++){if(types[i].target==="Type"){link=types[i].value;link=link.replace("=","");x=link.indexOf("<K");if(x>=0){link=link.substring(0,x)}break}}}return link};MetaLib.prototype.hasTagAttrValues=function(tagName,attrName){var member,ojv,ret=false;if(!attrName){return false}if(member=this._getTagAttrMemberObj(tagName,attrName)){ojv=this._getOjValues(member);ret=!!ojv}else if(this._components.isKnownTag(tagName)){ret=this._components.hasTagAttrValues(tagName,attrName)}return ret};MetaLib.prototype.isTagAttrValue=function(tagName,attrName,attrValue){var member,ojv,values,curValue,valType,i,ret=false;if(!attrName){return false}member=this._getTagAttrMemberObj(tagName,attrName);if(member){ojv=this._getOjValues(member);if(ojv){values=ojv.name;for(i=0;i<values.length;i++){if(ojv.type){valType=ojv.type[i];curValue=_convertValue(valType,attrValue);ret=curValue===values[i]}else{ret=attrValue===values[i]}if(ret){break}}}else{ret=true}}else{if(this._components.isKnownTag(tagName)){ret=this._components.isTagAttrValue(tagName,attrName,attrValue)}}return ret};MetaLib.prototype.isTagAttrEnumValueDeprecated=function(tagName,attrName,enumValue){var member,ojv,values,deps,dep,i,j,ret=null;if(!attrName){return null}member=this._getTagAttrMemberObj(tagName,attrName);if(!member){return this._isCompTagAttrEnumDepr(tagName,attrName,enumValue)}if(!member.ojdeprecated){return null}if(ojv=this._getOjValues(member)){values=ojv.name;for(i=0;i<values.length;i++){if(values[i]===enumValue){deps=member.ojdeprecated;for(j=0;j<deps.length;j++){dep=deps[j];if(dep.type&&dep.type!=="deprecated"){continue}if(dep.target==="propertyValue"&&dep.for===enumValue){ret={type:DEPRECATED,since:dep.since,description:dep.description};break}}}if(ret){break}}}return ret};MetaLib.prototype._isCompTagAttrEnumDepr=function(tagName,attrName,enumValue){if(!attrName){return null}return this._components?this._components.isTagAttrEnumDeprecated(tagName,attrName,enumValue):null};MetaLib.prototype.hasTagSlot=function(tagName){var ret;if(this.isJetLegacyTag(tagName)){ret=this._getSlots(tagName)?true:false}else if(this._components){this._components.hasTagSlot(tagName)}return ret};MetaLib.prototype.hasTagDefaultSlot=function(tagName){return this.isTagSlotName(tagName,"")};MetaLib.prototype.hasTagDynamicSlot=function(tagName){var tag,comp,members,b=false;tag=_removeChevrons(tagName);if(comp=this._getComponentFromTag(tag)){b=!!comp.header?.ojdynamicslot}else if(this._components){b=this._components.hasTagDynamicSlot(tag)}return b};MetaLib.prototype.isTagSlotName=function(tagName,slotName){var tag,slot;tag=_removeChevrons(tagName);slotName=slotName?slotName:"";if(this.isJetLegacyTag(tag)){slot=this._getSlotByName(this._getComponentFromTag(tag),slotName)}else if(this._components){if(!HtmlUtils.isCommonElem(tag)){slot=this._components.hasTagSlotName(tag,slotName)}}return!!slot};MetaLib.prototype.isTagSlotValue=function(tagName,slotName){return this.isTagSlotName(tagName,slotName)};MetaLib.prototype.isTagDynamicSlotValue=function(tagName,slotName){};MetaLib.prototype.getPreferredSlotContent=function(tag,slot){var obj,ret=null;if(obj=this.getPreferredSlotContentEx(tag,slot)){ret=obj.interfaces}return ret};MetaLib.prototype.getPreferredSlotContentEx=function(tag,slot){var ret;tag=_removeChevrons(tag);slot=slot?slot:"";if(this.isJetLegacyTag(tag)){ret=this.getJetPreferredSlotContent(tag,slot)}else if(this._components&&this._implements){ret=this._components.getPreferredSlotContent(tag,slot,this._implements)}return ret};MetaLib.prototype.getJetPreferredSlotContent=function(tag,slot){var clazz,slot,prefContent,content,comps;if(!this._implements||!(clazz=this._getComponentFromTag(tag))){return null}if(!slot){let defMem;if(clazz.member&&(defMem=clazz.member["Default"])&&defMem.ojchild){if(prefContent=defMem.ojpreferredcontent){prefContent.forEach(impl=>{if(content=this._implements[impl]){if(!comps){comps=[]}comps.push(...content)}})}}}else{if(clazz.slot){if(slot=clazz.slot[slot]){if(prefContent=slot.ojpreferredcontent){prefContent.forEach(impl=>{if(content=this._implements[impl]){if(!comps){comps=[]}comps.push(...content)}})}}}}return prefContent||comps?{interfaces:prefContent,components:comps}:null};MetaLib.prototype.isTagSlotDeprecated=function(tag,slotName){var status,md,ret;md=this.getTagSlotMetadata(tag,slotName);if(md&&(status=md.status)){let stat;for(let i=0;i<status.length;i++){stat=status[i];if(!stat.type||stat.type===DEPRECATED){ret=stat;break}}}return ret?ret:null};MetaLib.prototype.getTagSlotMetadata=function(tag,slot){var ret;tag=_removeChevrons(tag);if(this.isJetLegacyTag(tag)){ret=this._getJetTagSlotMetadata(tag,slot)}else if(this._components){ret=this._components.getTagSlotMetadata(tag,slot)}return ret};MetaLib.prototype._getJetTagSlotMetadata=function(tag,slotName){var o,slot;if(!(o=this._getComponentFromTag(tag))){return null}if(!o.slot||!(slot=o.slot[slotName])){return null}let deps,ret={};if(slot.ojpreferredcontent){ret.preferredContent=slot.ojpreferredcontent}if(slot.hasOwnProperty("ojminitems")){ret.minItems=slot.ojminitems}if(slot.hasOwnProperty("ojmaxitems")){ret.maxItems=slot.ojmaxitems}if(deps=slot.ojdeprecated){let dep,oStat,i;ret.status=[];for(i=0;i<deps.length;i++){dep=deps[i];oStat={};if(dep.hasOwnProperty("type")){oStat.type=dep.type}if(!dep.type||dep.type===DEPRECATED){if(dep.hasOwnProperty("target")){oStat.target=dep.target}if(dep.hasOwnProperty("for")){oStat.for=dep.for}if(dep.hasOwnProperty("value")){oStat.value=dep.value}}else if(dep.type===ANTIPATTERN){if(dep.hasOwnProperty("themes")){oStat.themes=dep.themes}}if(dep.hasOwnProperty("since")){oStat.since=dep.since}if(dep.hasOwnProperty("description")){oStat.description=dep.description}ret.status.push(oStat)}}return ret};MetaLib.prototype.isTagSupportedInTheme=function(tag){var o,a,ret=true;o=this._getComponentFromTag(tag);if(o){if(o.header){a=o.header.ojunsupportedthemes;ret=!(a&&a.includes(this._theme))}}else{ret=this._components&&this._components.isTagSupportedInTheme(tag,this._theme)}return ret};MetaLib.prototype.isAttrSupportedInTheme=function(tag,attr){var o,a,ret=true;o=this._getTagAttrMemberObj(tag,attr);if(o){a=o.ojunsupportedthemes;ret=!(a&&a.includes(this._theme))}else{ret=this._components.isAttrSupportedInTheme(tag,attr,this._theme)}return ret};MetaLib.prototype.hasTagCompPropSubprop=function(tagName,propName){var obj,ret=false;if(this.isCCATag(tagName)){obj=this._getComponentFromTag(tagName);if(obj&&obj.member){ret=obj.member[propName];ret=ret&&ret.submember}else if(this._components){ret=this._components.getTagProp(tagName,propName);ret=ret&&ret.properties}}return ret};MetaLib.prototype.isTagCompProp=function(tagName,propName){var obj,ret=false;if(this.isCCATag(tagName)){obj=this._getComponentFromTag(tagName);if(obj&&obj.member){ret=obj.member[propName]}else if(this._components){ret=this._components.isTagProp(tagName,propName)}}return ret};MetaLib.prototype.getTagAttrType=function(tag,attr){var member=this._getTagAttrMemberObj(tag,attr);return member?member.type:this._components.getTagPropType(tag,attr)};MetaLib.prototype.getTagAttrTypeEx=function(tag,attr){var ret={};var member=this._getTagAttrMemberObj(tag,attr);var t=member?member.type:this._components.getTagPropType(tag,attr);ret.raw=t;ret.types=t.split("|");ret.types.forEach((v,i,ar)=>{v=v.trim().toLowerCase().replace("array","Array");ar[i]=v.replace(">.",">")});return ret};MetaLib.prototype.getTagPropType=function(tagName,propName){return this._components?this._components.getTagPropType(tagName,propName):null};MetaLib.prototype.getTagPropMetadata=function(tag,attr){var obj;if(this._components){obj=this._components.getComponentPropMetadata(tag,attr)}return obj};MetaLib.prototype.getTagMetadata=function(tagName){var obj,comp,hdr,events,props,event,ret=null;tagName=_removeChevrons(tagName);if(!(obj=this._getComponentFromTag(tagName))){if(this._components){ret=this._components.getComponentMetadata(tagName)}return ret}if(hdr=obj.hdr){comp={};comp.name=hdr.customelement;if(hdr.slot){comp[PROP_SLOTS]=obj.slots}}if(obj.properties){comp[PROP_PROPS]=props={};this._extractProps(props,null,obj.properties,obj.name)}if(obj.events){comp[PROP_EVENTS]=events={};for(event in obj.events){}}if(obj.implements){comp[PROP_IMPLEMENTS]=obj.implements}if(obj.extension&&obj.extension.theme&&obj.extension.theme.unsupportedThemes){comp[PROP_UNSUP_THEME]=obj.extension.theme.unsupportedThemes}if(hdr&&hdr.ojsubcomponenttype){comp[PROP_SUBCOMPONENT_TYPE]=hdr.subcomponenttype}return ret};MetaLib.prototype.getAllCustomMetadata=function(){return this._components.getAllCustomMetadata()};MetaLib.prototype.getOjcMetadataByPath=function(path){return this._components.getOjcMetadataByPath(path)||null};MetaLib.prototype._getObjectMetadata=function(name){return this._json[name]};MetaLib.prototype.getPackPaths=function(){return this._components?this._components.getPackPaths():null};MetaLib.prototype.getPackMetadata=function(packName){return this._components?this._components.getPackMetadata(packName):null};MetaLib.prototype.getAllPackMetadata=function(){return this._components?this._components.getAllPackMetadata():null};MetaLib.prototype.getAllResourceMetadata=function(){return this._components?this._components.getAllResourceMetadata():null};MetaLib.prototype.getResourceMetadata=function(path){return this._components?this._components.getResourceMetadata(path):null};MetaLib.prototype.getResourcePaths=function(){return this._components?this._components.getResourcePaths():null};MetaLib.prototype.isTagStyleDeprecated=function(tagName,styleName){var o,ret;o=this.isWCStyleDeprecated(styleName);if(o){tagName=_removeChevrons(tagName);if(this._json.ojStyles.containers[o.index]===tagName){ret=o.dep.description}}return ret};MetaLib.prototype.isTagStyle=function(tagName,styleName){var obj,ret=false,compName,containers,indices,index,i;tagName=_removeChevrons(tagName);if(obj=this._getComponentFromTag(tagName)){compName=this._getComponentNameFromTag(tagName);containers=this._json.ojStyles.containers;indices=_getStyleIndices(this._json.ojStyles,styleName);if(indices){for(i=0;i<indices.length;i++){index=indices[i];if(index>=0){if(containers[index]===compName){ret=true;break}}}}}else{ret=this._components.isTagStyle(tagName)}return ret};MetaLib.prototype.isStyle=function(style){return this.isGenStyle(style)||this.isClassStyle(style)||this.isStylesetStyle(style)};MetaLib.prototype.isGenStyle=function(style){var x=this._json.genericStyles[style];return x||x===0?true:false};MetaLib.prototype.isJetStyle=function(style){return this._json.genericStyles[style]?"g":this._json.ojStyles[style]?"j":undefined};MetaLib.prototype.isCustomStyle=function(style){return this._components&&this._components.isStyle(style)};MetaLib.prototype.getStyleOrigin=function(style){var ret;if(this._json.genericStyles[style]){ret="g"}if(this._json.ojStyles[style]){ret=ret?"b":"j"}if(!ret&&this._components){if(this._components.isStyle(style)){ret="c"}}return ret};MetaLib.prototype.isClassStyle=function(style){var x=this._json.ojStyles[style];return x||x===0?true:false};MetaLib.prototype.isStylesetStyle=function(style){return this._stylesets?!!this._stylesets[style]:false};MetaLib.prototype.getStyleSelector=function(style,jet){var o,i,ret;if(typeof jet===BOOLEAN){o=jet?this._json.ojStyles[style]:this._json.genericStyles[style]}else{o=this._json.ojStyles[style];if(!o&&o!==0){o=this._json.genericStyles[style]}if(!o&&this._components){o=this._components.getStyleMetadata(style)}}if(this._utils.isObject(o)){if(o.styleselector){ret=o.styleselector}else if(o.meta){ret=o.meta.styleSelector}}else if(Array.isArray(o)){for(i=0;i<o.length;i++){if(this._utils.isObject(o[i])&&o[i].styleselector){if(!ret){ret=[]}ret.push(o[i].styleselector)}}if(ret&&ret.length===1){ret=ret[0]}}return ret?ret:null};MetaLib.prototype.isJetStylePrefix=function(s){var x;if(!s.startsWith(OJPREFIX)||!this._json.jetCssPrefixes.classes){return false}x=s.indexOf("-",3);if(x>=0){s=s.substring(0,x)}return this._json.jetCssPrefixes.classes.includes(s)};MetaLib.prototype.hasJetStylePrefixes=function(){return this._json.jetCssPrefixes&&this._json.jetCssPrefixes.classes};MetaLib.prototype.getClassesFromStyle=function(styleName,scope){var indices,oStyles,ret;scope=scope||"oj";if(scope==="oj"||scope==="both"){oStyles=this._json.ojStyles;if(oStyles){indices=_getStyleIndices(oStyles,styleName);if(indices){return _toContainers(oStyles,indices)}}}if(scope==="gen"||scope==="both"){oStyles=this._json.genericStyles;if(oStyles){indices=_getStyleIndices(oStyles,styleName);if(indices){ret=_toContainers(oStyles,indices)}}}return ret?ret:null};MetaLib.prototype.getJetTagFromStyle=function(styleName){var indices,oStyles,clazz;oStyles=this._json.ojStyles;if(oStyles){indices=_getStyleIndices(oStyles,styleName)}if(indices){if(indices.length>1||indices.length===0){clazz=null}else{clazz=this.isGenStyle(styleName)?null:_toContainers(oStyles,indices)}}return clazz?this.getTagFromClass(clazz):null};MetaLib.prototype.getJetTagsFromStyle=function(styleName){var indices,oStyles;oStyles=this._json.ojStyles;if(oStyles){indices=_getStyleIndices(oStyles,styleName);if(indices){return _toContainers(oStyles,indices,this._json)}}return null};MetaLib.prototype.getClassFromTag=function(tagName){return this._getComponentNameFromTag(_removeChevrons(tagName))};MetaLib.prototype.getClassFromModule=function(module){var clazz=this._json.moduleLookup[module];return clazz?clazz:null};MetaLib.prototype.getTagFromClass=function(className){if(className==="oj.ojTree"){return"oj-tree"}let ret=this._json[className];return ret&&ret.header?ret.header.customelement:null};MetaLib.prototype.isClass=function(className){var b=this._json[className];if(!b){if(className=this._classChange[className]){b=this._json[className]}}return!!b};MetaLib.prototype.isClassFinal=function(className){var clazz=this._json[className];if(!clazz){if(className=this._classChange[className]){clazz=this._json[className]}}return clazz&&clazz.header&&clazz.header.readonly};MetaLib.prototype.isClassMethod=function(className,methName){var clazz=this._json[className];return!!(clazz&&clazz.function&&clazz.function[methName])};MetaLib.prototype.isClassMethodStatic=function(className,methName){var meth,ret=null;var clazz=this._json[className];if(clazz&&clazz.function){meth=clazz.function[methName];ret=meth&&meth.scope&&meth.scope=="static"}return ret};MetaLib.prototype.getClassMethodScope=function(className,methName){var meth,ret=null;var clazz=this._json[className];if(clazz&&clazz.function){meth=clazz.function[methName];ret=meth.scope}return ret};MetaLib.prototype.isClassMember=function(className,memName){var clazz=this._json[className];return!!(clazz&&clazz.member&&clazz.member[memName])};MetaLib.prototype.isClassMemberStatic=function(className,memName){var mem,ret=null;var clazz=this._json[className];if(clazz&&clazz.member){mem=clazz.member[memName];ret=mem&&mem.scope&&mem.scope=="static"}return ret};MetaLib.prototype.getRequiredAttrs=function(tagName){let obj,clazz,i,ret=null;tagName=_removeChevrons(tagName);if(obj=this._getComponentFromTag(tagName)){clazz=this._getComponentNameFromTag(tagName)}ret=obj?this._reqAttrs[clazz]:this._components.getRequiredProps(tagName);if(this._curFileType!==FT_TSX&&ret&&ret.length){let ret2=[];for(i=0;i<ret.length;i++){ret2[i]=this._domUtils.kebabCase(ret[i])}ret=ret2}return ret};MetaLib.prototype.getTagsFromStyle=function(styleName){var classNames,tag,i,ret;ret=null;classNames=this.getClassesFromStyle(styleName);if(classNames){for(i=0;i<classNames.length;i++){tag=this.getTagFromClass(classNames[i]);if(tag){if(!ret){ret=[]}ret.push(tag)}}}return ret?ret:null};MetaLib.prototype.isStyleDeprecated=function(name){var s,o,t,i;s=this._json.genericStyles[name];if(!s&&s!==0&&this._json.ojStyles){s=this._json.ojStyles[name];if(!s&&s!==0&&this._stylesets){if(s=this._stylesets[name]){if(this._utils.isObject(s)){return!s.type||s.type==="deprecated"?s:null}}}}if(s){t=typeof s;if(Array.isArray(s)){for(i=0;i<s.length;i++){o=s[0];if(typeof o===OBJECT){if(!o.type||o.type==="deprecated"){break}}}}else if(t==="object"){if(!s.type||s.type==="deprecated"){o=s}}else{o=null}}return o?o.dep:null};MetaLib.prototype.isStyleDeprecatedEx=function(style){var a=null,ss,t,i;function _pushSS(o){if(o.dep){if(!o.dep.type||o.dep.type==="deprecated"){if(!a){a=[]}a.push(o)}}};function _stashSS(s){t=typeof s;if(Array.isArray(s)){for(i=0;i<s.length;i++){_pushSS(s[i])}}else if(t==="object"){_pushSS(s)}};if(ss=this._json.genericStyles[style]){_stashSS(ss)}if(ss=this._json.ojStyles[style]){_stashSS(ss)}else if(ss!==0&&this._stylesets){ss=this._stylesets[style];return this._utils.isObject(ss)?ss:null}return a};MetaLib.prototype.isWCStyleDeprecated=function(name){var s,o,t,i;s=this._json.ojStyles[name];if(s){t=typeof s;if(Array.isArray(s)){for(i=0;i<s.length;i++){o=s[i];if(typeof o===OBJECT){break}o=null}}else if(t==="object"){o=s}}return o?o:null};MetaLib.prototype.isBindingTag=function(tagName){var obj=this._getComponentFromTag(_removeChevrons(tagName));return obj&&obj.header?!!obj.header.ojbindingelement:false};MetaLib.prototype.isComponent=function(className){var obj=this._json[className];if(!obj){if(!className.startsWith("oj.")){obj=this._json["oj."+className]}}return!!obj};MetaLib.prototype.isClass=function(className){return!!this._json[className]};MetaLib.prototype.isJetComponentClass=function(className){return this.isClass(className)};MetaLib.prototype.isComponentDeprecated=function(className){return this.isClassDeprecated(className)};MetaLib.prototype.isClassDeleted=function(className){var classes,cn,version=null;if(this._delHist){if(classes=this._delHist.classes){cn=this._classChange[className];if(cn){className=cn}version=classes[className]}}return version};MetaLib.prototype.isClassRenamed=function(className){return this._renHist?this._renHist[className]:null};MetaLib.prototype.isClassDeprecated=function(className){var obj,ret=null;if(className==="oj.ojTree"){if(SemVer.gte(this._jetVer,"5.2.0")){return null}else{return{type:DEPRECATED,since:"5.2.0",description:"Use ojTreeView instead"}}}if(!(obj=this._json[className])){className=this._classChange[className];obj=className?this._json[className]:undefined}if(obj){if(obj.header){ret=this._isClassDeprecated(obj.header);if(ret&&ret.description){ret.description=this._utils.removeLink(ret.description)}}if(!ret){ret=this._isClassDeprecated(obj)}}return ret};MetaLib.prototype._isClassDeprecated=function(obj){var depr,status,ret=null;if(obj){if(obj.ojdeprecated&&obj.ojdeprecated.length){depr=obj.ojdeprecated;for(status of depr){if(!status.type||status.type===DEPRECATED){ret=status;if(!ret.type){ret.type=DEPRECATED}break}}}else if(depr=obj.deprecated){ret={type:DEPRECATED,description:typeof depr===BOOLEAN?NO_SUGGESTION_AVAIL:depr}}}return ret};MetaLib.prototype.isClassMethodDeleted=function(className,methodName){var a,cn,i,ret=null;a=this._deletedMethods[methodName];if(a){cn=this._classChange[className];if(cn){className=cn}for(i=0;i<a.length;i++){if(a[i]===className){ret=a[i+1];break}i++}}return ret};MetaLib.prototype.isClassMethodDeprecated=function(className,methodName){var obj,method,ret=null;obj=this._json[className];if(!obj){className=this._classChange[className];obj=className?this._json[className]:undefined}if(obj&&obj.function){for(method in obj.function){if(method===methodName){method=obj.function[method];ret=this._isSubStateDeprecated(method);break}}}return ret};MetaLib.prototype.isClassMemberDeleted=function(className,memberName){var a,i,cname,ret=null;a=this._deletedMembers[memberName];if(a){cname=this._classChange[className];for(i=0;i<a.length;i++){if(a[i]===className||a[i]===cname){ret=a[i+1];break}i++}}return ret};MetaLib.prototype.isClassMemberDeprecated=function(className,memName){var obj,member,obj,ret=null;obj=this._json[className];if(!obj){className=this._classChange[className];obj=className?this._json[className]:undefined}if(obj&&obj.member){memName=memName.charAt(0)===":"?memName.substring(1):memName;for(member in obj.member){if(member===memName){member=obj.member[memName];ret=this._isSubStateDeprecated(member,true);break}}}return ret};MetaLib.prototype.isClassAttrDeprecated=function(className,attrName){var obj,member,ret=null;obj=this._json[className];attrName=attrName.charAt(0)===":"?attrName.substring(1):attrName;if(obj&&obj.member){for(member in obj.member){member=obj.member[member];if(attrName===member.name){ret=this._isSubStateDeprecated(member,true);break}}}return ret};MetaLib.prototype.isComponentDeleted=function(className){return this.isClassDeleted(className)};MetaLib.prototype.isComponentAttrDeprecated=function(className,attrName){return this.isClassAttrDeprecated(className,attrName)};MetaLib.prototype.isComponentMethodDeprecated=function(className,methodName){return this.isClassMethodDeprecated(className,methodName)};MetaLib.prototype.isComponentMemberDeprecated=function(className,memberName){return this.isClassMemberDeprecated(className,memberName)};MetaLib.prototype.isComponentMethodDeleted=function(className,methodName){return this.isClassMethodDeleted(className,methodName)};MetaLib.prototype.isComponentMemberDeleted=function(className,memberName){return this.isClassMemberDeleted(className,memberName)};MetaLib.prototype.isTagPackPrivate=function(tag){var o,ret;if(!tag){return false}tag=_removeChevrons(tag);if(this.isJetTag(tag)){if(o=this._getComponentFromTag(tag)){ret=o.header&&o.header.ojsubcomponenttype===PACK_PRIVATE}}else if(this._components){ret=this._components.isTagPackPrivate(tag)}return ret};MetaLib.prototype.isTagAttrTranslatable=function(tag,attr){var member=this._getTagAttrMemberObj(tag,attr);return member?this._isSubStateTranslatable(member):this._components.isTagAttrTranslatable(tag,attr)};MetaLib.prototype.isTagAttrReadOnly=function(tag,attr){var o,ret=false;tag=_removeChevrons(tag);if(o=this._getTagAttrMemberObj(tag,attr)){ret=o&&o.readonly}else if(this._components){ret=this._components.isTagAttrReadOnly(tag,attr)}return ret};MetaLib.prototype.isTagAttrWriteback=function(tag,attr){var o,ret=false;tag=_removeChevrons(tag);if(o=this._getTagAttrMemberObj(tag,attr)){ret=o&&o.ojwriteback}else if(this._components){ret=this._components.isTagAttrWriteback(tag,attr)}return ret};MetaLib.prototype.hasTagDataOjCommand=function(tagName){var obj,ret=false,compName,containers,indexes,i;tagName=_removeChevrons(tagName);obj=this._getComponentFromTag(tagName);if(obj){compName=this._getComponentNameFromTag(tagName);indexes=this._json.dataOjCommand;if(indexes){containers=this._json.ojStyles.containers;for(i=0;i<indexes.length;i++){if(containers[indexes[i]]===compName){ret=true;break}}}}return ret};MetaLib.prototype.isTagEvent=function(tagName,eventName){var obj,attr,x,evName,ret=false;eventName=eventName.charAt(0)===":"?eventName.substring(1):eventName;evName=eventName.includes("-")?eventName:this._domUtils.kebabCase(eventName);if(!eventName.startsWith(EVENT_ON)){return ret}if(this.isWCTag(tagName)){if(this._getComponentNameFromTag(tagName)){obj=this._getComponentFromTag(_removeChevrons(tagName));if(this._curFileType===FT_TSX){if(!(evName=this._transformTsxLegacyTagEvent(eventName))){return false}}if(obj&&obj.htmlevents){ret=!!obj.htmlevents[evName]}if(!ret){if((x=evName.lastIndexOf(DASH_CHANGED))>=0){attr=evName.substring(3,x);attr=this._domUtils.camelCase(attr);ret=!!obj.member[attr]}}}else{ret=this._components&&this._components.isTagEvent(tagName,eventName)}if(!ret){ret=HtmlUtils.isCommonEventAttr(eventName)}}return ret};MetaLib.prototype._transformTsxLegacyTagEvent=function(eventName){var evName;if(eventName.startsWith("on")){let c,i=2;if(eventName.substring(2,4)==="oj"){i=4}c=eventName.charAt(i).toUpperCase();i++;evName=this._domUtils.kebabCase("on"+(i>4?"Oj":"")+c+eventName.substring(i))}return evName};MetaLib.prototype.isTagStatus=function(tag,statType){var clazz,ret;if(clazz=this._getComponentNameFromTag(_removeChevrons(tag))){let stats,status;if(stats=clazz?.header?.ojdeprecated){for(i=0;i<status.length;i++){status=stats[i];if(status.type===statType||statType===DEPRECATED&&!status.hasOwnProperty("type")){ret=true;break}}}}else{ret=this._components.isTagStatus(tag,statType)}return!!ret};MetaLib.prototype.getTagStatus=function(tag,statType){var clazz,ret=null;if(statType&&!this._isTagStatusType(statType)){return null}if(!(clazz=this._getComponentNameFromTag(_removeChevrons(tag)))){return this._components.getTagStatus(tag,statType)}if(clazz==="oj.ojTree"){if(SemVer.gte(this._jetVer,"5.2.0")){return null}else{if(statType===DEPRECATED){return[{type:DEPRECATED,description:"Use <oj-tree-view> instead"}]}else if(statType===SUPERSEDES){return[{type:SUPERSEDES,description:"Superseded by <oj-tree-view>"}]}return null}}let obj=this._json[clazz];if(obj&&obj.header){let arStat,omitted=statType===undefined;if(Array.isArray(arStat=obj.header.ojdeprecated)){let stat,i,stType;for(i=0;i<arStat.length;i++){stat=arStat[i];if(!(stType=stat.type)){stType=DEPRECATED}if(omitted||stType===statType){if(!ret){ret=[]}ret.push(obj={type:stType});if(stat.hasOwnProperty("target")){obj.target=stat.target}if(stat.hasOwnProperty("value")){obj.value=stat.value}if(stat.hasOwnProperty("since")){obj.since=stat.since}if(stat.hasOwnProperty("description")){obj.description=stat.description}if(stType===ANTIPATTERN&&stat.hasOwnProperty("themes")){ret.themes=stat.themes}this._handleStatusFor(stat,stType,ret)}}}else if(typeof arStat===STRING){ret=[{description:arStat}]}}return ret};MetaLib.prototype._isTagStatusType=function(type){return type===DEPRECATED||type===MAINTENANCE||type===SUPERSEDES||type===ANTIPATTERN};MetaLib.prototype.getPropStatus=function(tagName,propName,statType){var clazz,prop,propName2,status,ret;var omitted=statType===undefined;if(statType&&!this._isTagStatusType(statType)){return null}propName=propName.charAt(0)===":"?propName.substring(1):propName;if(clazz=this._getComponentNameFromTag(_removeChevrons(tagName))){let obj=this._json[clazz];if(this._curFileType===FT_TSX){if(obj.member){propName2=obj.member[propName]}}else if(obj.htmlattributes){propName2=obj.htmlattributes[propName]}if(!propName2){return null}if(obj&&obj.member&&(prop=obj.member[propName2])){if(status=prop.ojdeprecated){let i;for(i=0;i<status.length;i++){let stat,stType,o;stat=status[i];if(!(stType=stat.type)){stType=DEPRECATED}if(omitted||stType===statType){if(!ret){ret=[]}o={type:stType};if(stat.hasOwnProperty("target")){o.target=stat.target}if(stat.hasOwnProperty("value")){o.value=stat.value}if(stat.hasOwnProperty("since")){o.since=stat.since}if(stat.hasOwnProperty("description")){o.description=stat.description}if(stType===ANTIPATTERN&&stat.hasOwnProperty("themes")){o.themes=stat.themes}this._handleStatusFor(stat,stType,o);ret.push(o)}}}}}else{propName2=this._curFileType===FT_TSX?propName:this._domUtils.camelCase(propName);ret=this._components.getPropStatus(tagName,propName2,statType)}return ret?ret:null};MetaLib.prototype._handleStatusFor=function(stat,stType,obj){if(stType===ANTIPATTERN){if(stat.hasOwnProperty("for")&&obj.target===STATUS_PROP_VALUE){obj.value=stat.for}}else if(stType===DEPRECATED&&stat.hasOwnProperty("for")){if(obj.target===STATUS_PROP_VALUE||obj.target===STATUS_PROP_TYPE){obj.value=stat.for}}else if(stType===MAINTENANCE||stType===SUPERSEDES){if(stat.hasOwnProperty("for")){obj.value=stat.for}}};MetaLib.prototype.applySchema=function(obj){return this._compSvcs.validateComponentJsonWithSchema(obj)};MetaLib.prototype.walkElemStackForOJTag=function(ctx,excludeBindIf){var i,name,ret=null;var stack=ctx.elemStack;if(stack&&stack.length){for(i=stack.length-1;i>=0;i--){name=stack[i].name;if(name.toLowerCase().startsWith(OJPREFIX)){if(!name.startsWith("oj-bind-")||!excludeBindIf){ret=name;break}}}}return ret};MetaLib.prototype.walkDomStackForOJTag=function(ctx,excludeBindIf){return this.walkElemStackForOJTag(ctx,excludeBindIf)};MetaLib.prototype.getPublicInterface=function(){return{isJetTag:this.isJetTag.bind(this),isWCTag:this.isWCTag.bind(this),isComponentTag:this.isComponentTag.bind(this),isJetCoreTag:this.isJetCoreTag.bind(this),isCoreTag:this.isCoreTag.bind(this),isJetLegacyTag:this.isJetLegacyTag.bind(this),isTagDeprecated:this.isTagDeprecated.bind(this),isTagSupportedInTheme:this.isTagSupportedInTheme.bind(this),isAttrSupportedInTheme:this.isAttrSupportedInTheme.bind(this),isTagAttrDeprecated:this.isTagAttrDeprecated.bind(this),isTagAttrTranslatable:this.isTagAttrTranslatable.bind(this),isTagAttrReadOnly:this.isTagAttrReadOnly.bind(this),isTagAttrEnumValueDeprecated:this.isTagAttrEnumValueDeprecated.bind(this),isTagAttr:this.isTagAttr.bind(this),isJetTagAttr:this.isJetTagAttr.bind(this),hasTagAttrValues:this.hasTagAttrValues.bind(this),isTagAttrValue:this.isTagAttrValue.bind(this),getTagAttrType:this.getTagAttrType.bind(this),getTagAttrTypeEx:this.getTagAttrTypeEx.bind(this),getAllCustomMetadata:this.getAllCustomMetadata.bind(this),getTagMetadata:this.getTagMetadata.bind(this),getTagPropMetadata:this.getTagPropMetadata.bind(this),getOjcMetadataByPath:this.getOjcMetadataByPath.bind(this),getAllPackMetadata:this.getAllPackMetadata.bind(this),getPackMetadata:this.getPackMetadata.bind(this),getPackPaths:this.getPackPaths.bind(this),getAllResourceMetadata:this.getAllResourceMetadata.bind(this),getResourceMetadata:this.getResourceMetadata.bind(this),getResourcePaths:this.getResourcePaths.bind(this),isTagCompProp:this.isTagCompProp.bind(this),hasTagCompPropSubprop:this.hasTagCompPropSubprop.bind(this),getTagPropType:this.getTagPropType.bind(this),hasTagSlot:this.hasTagSlot.bind(this),hasTagDefaultSlot:this.hasTagDefaultSlot.bind(this),isTagSlotName:this.isTagSlotName.bind(this),isTagSlotValue:this.isTagSlotValue.bind(this),isTagSlotDeprecated:this.isTagSlotDeprecated.bind(this),getPreferredSlotContent:this.getPreferredSlotContent.bind(this),getPreferredSlotContentEx:this.getPreferredSlotContentEx.bind(this),getTagSlotMetadata:this.getTagSlotMetadata.bind(this),hasTagDataOjCommand:this.hasTagDataOjCommand.bind(this),isBindingTag:this.isBindingTag.bind(this),isTagAttrWriteback:this.isTagAttrWriteback.bind(this),isTagPackPrivate:this.isTagPackPrivate.bind(this),isTagStatus:this.isTagStatus.bind(this),getTagStatus:this.getTagStatus.bind(this),getPropStatus:this.getPropStatus.bind(this),isClass:this.isClass.bind(this),isClassRenamed:this.isClassRenamed.bind(this),isClassDeleted:this.isClassDeleted.bind(this),isClassDeprecated:this.isClassDeprecated.bind(this),isClassMethodDeleted:this.isClassMethodDeleted.bind(this),isClassMemberDeleted:this.isClassMemberDeleted.bind(this),isClassMethodDeprecated:this.isClassMethodDeprecated.bind(this),isClassMemberDeprecated:this.isClassMemberDeprecated.bind(this),isClassAttrDeprecated:this.isClassAttrDeprecated.bind(this),isClassFinal:this.isClassFinal.bind(this),isClassMethod:this.isClassMethod.bind(this),isClassMethodStatic:this.isClassMethodStatic.bind(this),isClassMember:this.isClassMember.bind(this),isClassMemberStatic:this.isClassMemberStatic.bind(this),getClassMethodScope:this.getClassMethodScope.bind(this),getStyleOrigin:this.getStyleOrigin.bind(this),isJetStyle:this.isJetStyle.bind(this),isCustomStyle:this.isCustomStyle.bind(this),isTagStyle:this.isTagStyle.bind(this),isStyle:this.isStyle.bind(this),isGenStyle:this.isGenStyle.bind(this),isClassStyle:this.isClassStyle.bind(this),isStylesetStyle:this.isStylesetStyle.bind(this),isStyleDeprecated:this.isStyleDeprecated.bind(this),isStyleDeprecatedEx:this.isStyleDeprecatedEx.bind(this),getStyleSelector:this.getStyleSelector.bind(this),getNonSSStyleElems:this.getNonSSStyleElems.bind(this),isJetStylePrefix:this.isJetStylePrefix.bind(this),hasJetStylePrefixes:this.hasJetStylePrefixes.bind(this),isTagEvent:this.isTagEvent.bind(this),isTagEventDeprecated:this.isTagEventDeprecated.bind(this),getTagPropertyFromEvent:this.getTagPropertyFromEvent.bind(this),getTagsFromStyle:this.getTagsFromStyle.bind(this),getJetTagFromStyle:this.getJetTagFromStyle.bind(this),getJetTagsFromStyle:this.getJetTagsFromStyle.bind(this),getClassesFromStyle:this.getClassesFromStyle.bind(this),getClassFromTag:this.getClassFromTag.bind(this),getClassFromModule:this.getClassFromModule.bind(this),getTagFromClass:this.getTagFromClass.bind(this),getDeprecatedMethodList:this.getDeprecatedMethodList.bind(this),getDeprecatedMemberList:this.getDeprecatedMemberList.bind(this),getDeletedMethodList:this.getDeletedMethodList.bind(this),getDeletedMemberList:this.getDeletedMemberList.bind(this),getRequiredAttrs:this.getRequiredAttrs.bind(this),isComponent:this.isComponent.bind(this),isNamespaceTag:this.isNamespaceTag.bind(this),isNSRegistered:this.isNSRegistered.bind(this),isNamespacePrefix:this.isNamespacePrefix.bind(this),isRuleIgnored:this.isRuleIgnored.bind(this),getRenamedClassList:this.getRenamedClassList.bind(this),getDeletedClassList:this.getDeletedClassList.bind(this),processImplements:this.processImplements.bind(this),isInterfaceImplemented:this.isInterfaceImplemented.bind(this),getInterfaces:this.getInterfaces.bind(this),getImplementers:this.getImplementers.bind(this),getSubcomponentType:this.getSubcomponentType.bind(this),getWCInterfaces:this.getWCInterfaces.bind(this),hasWCInterfaces:this.hasWCInterfaces.bind(this),hasJetWCInterfaces:this.hasJetWCInterfaces.bind(this),getMetaVers:this.getMetaVers.bind(this),walkElemStackForOJTag:this.walkelemStackForOJTag,walkDomStackForOJTag:this.walkDomStackForOJTag,isIgnoreAttr:this.isIgnoreAttr.bind(this),applySchema:this.applySchema.bind(this),getRevisionInfo:this.getRevisionInfo.bind(this),_getObjectMetadata:this._getObjectMetadata.bind(this)}};MetaLib.prototype.loadMeta=function(metaFile){var metaObj,ret=false;if(!this._json){try{if(metaObj=this._nd.metaLoader.loadMeta(metaFile,this._nd,this._fsUtils)){this._json=metaObj.meta;this._delHist=metaObj.delMeta;this._renHist=metaObj.renMeta;this._reqAttrs=metaObj.reqattr;this._jetVerRaw=this._json.meta.jetversion;this._jetVer=_removeJetVerExtension(this._jetVerRaw);this._metaCommonAnalysis();ret=true}else{this._error(`Metadata '${metaFile}' not found!`)}}catch(e){this._error(`[${e.name}]: Metadata load (${metaFile}) - ${e.message}`)}}return ret};MetaLib.prototype.getNonLegacyMaintenanceTags=function(){return this._components.getMaintenanceTags()};MetaLib.prototype.getRenamedClassList=function(){return this._renHist};MetaLib.prototype.getDeletedClassList=function(){return this._delHist};MetaLib.prototype.processImplements=function(tag,impls){if(Array.isArray(impls)&&this._implements){impls.forEach(impl=>{if(this._implements[impl]){this._implements[impl].push(tag)}else{this._implements[impl]=[tag]}})}};const OJV_CHARS=/[<>]/;MetaLib.prototype._getOjValues=function(mem){var ts,ret;if(!mem){return false}if(mem.ojvalues){if(mem.ojvalues.name&&Array.isArray(mem.ojvalues.name)&&mem.ojvalues.name.length){return mem.ojvalues}return}if(mem.tstype&&mem.tstype.m_ojvalues){return mem.tstype.m_ojvalues}ts=this._getTsTypeObject(mem);if(ts&&ts.ojvalues&&ts.ojvalues.name){if(Array.isArray(ts.ojvalues.name)&&ts.ojvalues.name.length){ret=ts.ojvalues}}return ret};MetaLib.prototype.getImplementers=function(ifc){var ret;if(this._implements&&ifc){ret=this._implements[ifc]}return ret||null};MetaLib.prototype.getInterfaces=function(tag){var obj,hdr,impls,ret;if(!tag){return null}tag=_removeChevrons(tag);if(this.isJetLegacyTag(tag)){if(obj=this._getComponentFromTag(tag)){if(hdr=obj.header){if(hdr.domInterface&&hdr.customelement){impls=hdr.domInterface;ret=Array.isArray(impls)?impls:[impls]}}}}else if(this.isComponentTag(tag)||this.isJetCoreTag(tag)){ret=this._components.getInterfaces(tag)}return ret||null};MetaLib.prototype.getWCInterfaces=function(){return this._implements};MetaLib.prototype.hasJetWCInterfaces=function(){return this._hasJetWCIFCs};MetaLib.prototype.hasWCInterfaces=function(){return!!this._implements};MetaLib.prototype.isInterfaceImplemented=function(tag,ifcName){var ifc,ret;if(ifc=this.getInterfaces(tag)){for(let i=0;i<ifc.length;i++){if(ifc[i]===ifcName){ret=true;break}}}return!!ret};MetaLib.prototype.getSubcomponentType=function(tag){var obj,hdr,ret;if(tag=_removeChevrons(tag)){if(this.isJetTag(tag)){if(obj=this._getComponentFromTag(tag)){if(hdr=obj.header){ret=hdr.ojsubcomponenttype}}}else if(this.isComponentTag(tag)){ret=this._components.getSubcomponentType(tag)}}return ret||null};MetaLib.prototype._createNonClassList=function(mp){this._nonClasses=mp.nonClasses?mp.nonClasses:["genericStyles","ojStyles"];this._nonClasses.push("moduleLookup");this._nonClasses.push("newGenericStyles");this._nonClasses.push("newOjStyles");if(!this._nonClasses.includes("custElementClassLookup"))this._nonClasses.push("custElementClassLookup");if(!this._nonClasses.includes("meta"))this._nonClasses.push("meta");if(!this._nonClasses.includes("ResponsivePrefixes"))this._nonClasses.push("ResponsivePrefixes")};MetaLib.prototype.setAmdMeta=function(obj){this._json=obj.jetMeta.meta;this._delHist=obj.jetMeta.delMeta;this._reqAttrs=obj.jetMeta.reqattr;this._jetVerRaw=this._json.meta.jetversion;this._jetVer=_removeJetVerExtension(this._jetVerRaw);this._metaCommonAnalysis();return true};MetaLib.prototype._metaCommonAnalysis=function(){this._createNonClassList(this._json.meta);this._createModuleLookup();this._createClassNameChanges();this._fixup_jet_42315();this._createImplements()};MetaLib.prototype.setTheme=function(theme){this._theme=theme};MetaLib.prototype._createModuleLookup=function(){var comps,compName,lookup,hdr;if(this._json.moduleLookup){return}this._json.moduleLookup=lookup={};comps=this._json;for(compName in comps){if(!this._nonClasses.includes(compName)&&!compName.startsWith("oj.__")){hdr=comps[compName].header;if(hdr){lookup[OJS+hdr.name.toLowerCase()]=compName}}}};MetaLib.prototype._createClassNameChanges=function(){var comps,compName,o,hdr;if(this._classChange=this._json.meta.isClassNameChanges){return}this._classChange=o={};comps=this._json;for(compName in comps){if(!this._nonClasses.includes(compName)){hdr=comps[compName].header;if(hdr&&compName!==hdr.name){o[hdr.name]=compName}}}this._json.meta.isClassNameChanges=true};MetaLib.prototype._fixup_jet_42315=function(){var o;if(SemVer.gte(this._jetVer,"8.0.0")){if(o=this._json.Color||this._json["oj.Color"]||this._json["oj.ojColor"]){if(!o.header){o.header={}}o.header.readonly=true}}};MetaLib.prototype._createImplements=function(){var clazzes,clazz,tag,impls,impl,o={},a,hdr;if(this._implements=this._json.meta.interfaces){return}clazzes=this._json;for(clazz in clazzes){if(this._nonClasses.includes(clazz)){continue}if(hdr=clazzes[clazz].header){if(hdr.domInterface&&hdr.customelement){impls=hdr.domInterface;impls=Array.isArray(impls)?impls:[impls];for(impl of impls){if(o[impl]){a=o[impl]}else{o[impl]=a=[]}this._hasJetWCIFCs=true;tag=this.getTagFromClass(clazz);if(tag&&!a.includes(tag)){a.push(tag)}}}}}this._implements=this._hasJetWCIFCs?o:null};MetaLib.prototype.getMetaVers=function(){return{versions:this._jetVersions,runver:this._jetVer}};MetaLib.prototype.setComponentsLib=function(compSvcs,comps){if(compSvcs){this._compSvcs=compSvcs}if(comps){this._components=comps}};MetaLib.prototype.setStylesets=function(ss){if(!ss){return}var o,obj,e,i;if(!this._stylesets){this._stylesets=obj={}}else{obj=this._stylesheets}for(i=0;i<ss.length;i++){o=ss[i];if(typeof o===STRING){obj[o]=true}else if(o.deprecated){obj[o.deprecated]=e={};if(o.since){e.since=o.since}if(o.note){e.description=o.note}else if(o.description){e.description=o.description}}}};MetaLib.prototype.setDomUtils=function(du){this._domUtils=du};MetaLib.prototype.getDomUtils=function(){return this._domUtils};MetaLib.prototype.setCurFileType=function(ft){this._curFileType=ft&&ft.startsWith(DOT)?ft.substring(1):ft;this._components.setCurFileType(this._curFileType)};MetaLib.prototype.getRevisionInfo=function(){var metaSect=this._json.meta;var revision="";var x;return{revision:revision,tag:metaSect.jetrevision,jetVersionRaw:metaSect.jetversion,jetVersion:(x=metaSect.jetversion.indexOf("-"))>=0?metaSect.jetversion.substring(0,x):metaSect.jetversion,date:metaSect.date,time:metaSect.time}};MetaLib.prototype._isSubStateDeprecated=function(obj,isMember){var depr,retStatus=null;if(obj&&obj.ojdeprecated&&obj.ojdeprecated.length){retStatus=this._createLegacyDeprecatedStatus(obj.ojdeprecated,isMember)}else if(depr=obj.deprecated){retStatus=typeof depr===BOOLEAN?NO_SUGGESTION_AVAIL:depr;retStatus=[{type:DEPRECATED,description:retStatus}]}return retStatus};MetaLib.prototype._isSubStateTranslatable=function(obj){return obj&&obj.ojtranslatable};MetaLib.prototype._createLegacyDeprecatedStatus=function(depr,isMember){var retStatus,depr,o;if(depr){depr.forEach(status=>{if(status.type&&status.type!==DEPRECATED){return}retStatus=[];o={type:DEPRECATED};if(status.hasOwnProperty("target")){o.target=status.target;if(isMember&&status.target==="memberType"){if(status.value&&status.value.length>1){o.target="propertyValue";o.value=[];status.value.forEach((elem,x)=>{if(x){if(elem.startsWith("'")||elem.startsWith("\"")){elem=elem.substring(1,elem.length-1)}o.value.push(elem)}})}else{o.target="propertyType"}}}if(status.hasOwnProperty("description")){o.description=status.description}if(status.hasOwnProperty("since")){o.since=status.since}if(status.hasOwnProperty("for")){o.value=[status.for]}else if(!o.value&&status.hasOwnProperty("value")){o.value=status.value}retStatus.push(o)})}return retStatus&&retStatus.length?retStatus:null};MetaLib.prototype._getComponentNameFromTag=function(tagName){var ret;if(tagName){tagName=tagName.toLowerCase();ret=this._json.custElementClassLookup[tagName]?this._json.custElementClassLookup[tagName]:null}else{ret=false}return ret};MetaLib.prototype.isIgnoreAttr=function(tagName,attrName){var ret=false;attrName=attrName.toLowerCase();attrName=attrName.charAt(0)===":"?attrName.substr(1):attrName;if(HtmlUtils.isCommonElem(attrName)||attrName.startsWith("aria-")){return true}if(tagName==="oj-avatar"){if(attrName==="src"||attrName==="initials")ret=true}else if(tagName==="oj-option"){if(attrName==="value")ret=true}return ret};MetaLib.prototype.getDeprecatedMethodList=function(){if(this._deprecatedMethods){return this._deprecatedMethods}var json=this._json;var name,methName,methObj,depMeth,o,a;var ret={};for(name in json){o=json[name];if(o&&o.function){for(methName in o.function){methObj=o.function[methName];depMeth=methObj.ojdeprecated;if(depMeth&&(!depMeth.type||depMeth.type==="deprecated")){if(ret[methName]){a=ret[methName]}else{ret[methName]=a=[]}a.push(name)}}}}return this._deprecatedMethods=ret};MetaLib.prototype.getDeprecatedMemberList=function(){if(this._deprecatedMembers){return this._deprecatedMembers}var json=this._json;var name,memName,memObj,depMem,o,a;var ret={};for(name in json){o=json[name];if(o&&o.member){for(memName in o.member){memObj=o.member[memName];depMem=memObj.ojdeprecated;if(depMem&&(!depMem.type||depMem.type==="deprecated")){if(ret[memName]){a=ret[memName]}else{ret[memName]=a=[]}a.push(name)}}}}return this._deprecatedMembers=ret};MetaLib.prototype.getDeletedMethodList=function(){if(this._deletedMethods){return this._deletedMethods}var json=this._delHist;var name,methName,ver,o,a;var ret={};if(json){for(name in json){o=json[name];if(o&&o.methods){for(methName in o.methods){ver=o.methods[methName];if(ret[methName]){a=ret[methName]}else{ret[methName]=a=[]}a.push(name);a.push(ver)}}}}return this._deletedMethods=ret};MetaLib.prototype.getDeletedMemberList=function(){if(this._deletedMembers){return this._deletedMembers}var json=this._delHist;var name,memName,ver,o,a;var ret={};if(json){for(name in json){o=json[name];if(o&&o.members){for(memName in o.members){ver=o.members[memName];if(ret[memName]){a=ret[memName]}else{ret[memName]=a=[]}a.push(name);a.push(ver)}}}}return this._deletedMembers=ret};MetaLib.prototype._getSlots=function(tagName){var obj=this._getComponentFromTag(_removeChevrons(tagName));return this._getSlots2(obj)};MetaLib.prototype._getSlots2=function(base){var bases,base,i,ret=null;while(base){ret=base&&base.slot?base.slot:null;if(ret){break}bases=base.header&&base.header.augments?base.header.augments:null;if(!bases){break}for(i=0;i<bases.length;i++){base=this._json[bases[i]];ret=this._getSlots2(base);if(ret){base=null;break}}}return ret?ret:null};MetaLib.prototype._getSlotByName=function(base,slotName){var ret=null;while(base){if(!slotName){ret=base&&base.member?base.member.Default&&base.member.Default.ojchild:null}else{if(base&&base.slot){ret=base.slot[slotName]}}break}return ret?ret:null};MetaLib.prototype._getComponentFromTag=function(tagName){var o=this._getComponentNameFromTag(tagName);if(o){o=this._json[o]}return o?o:null};function _getStyleIndices(scope,styleName){var a,n,ret,i;a=scope[styleName];if(a||a===0){if(!ret){ret=[]}if(Array.isArray(a)){for(i=0;i<a.length;i++){n=a[i];if(typeof n===OBJECT){n=a[i].index}ret.push(n)}}else{if(typeof a===OBJECT){n=a.index}else{n=a}ret.push(n)}}return ret&&ret.length?ret:null};MetaLib.prototype.getNonSSStyleElems=function(styleName,scope){var a,n,ret,i;scope=scope?this._json.ojStyles:this._json.genericStyles;a=scope[styleName];if(a||a===0){if(!ret){ret=[]}if(Array.isArray(a)){for(i=0;i<a.length;i++){n=a[i];if(typeof n===OBJECT&&!n.styleselector){n=a[i].index}ret.push(n)}}else{if(typeof a===OBJECT&&!a.styleselector){n=a.index}else{n=a}ret.push(n)}}return ret&&ret.length?_toContainers(scope,ret,this._json):null};MetaLib.prototype.displayImpls=function(){var impls,impl;this._console("[info] :--------- JET Interfaces Implemented ---------","I");if(!(impls=this._implements)){this._console(" None!","I")}else{for(impl in impls){this._console(`${impl} : <- <${impls[impl].join(",")}>`,"I")}}this._console("[info]: -------- End Declared Web Components ---------\n","I")};function _removeJetVerExtension(ver){let x=ver.indexOf("-");return x>=0?ver.substring(0,x):ver};function _toContainers(scope,indices,json){var cont,ret,clazz,elem,n,i;cont=scope.containers;for(i=0;i<indices.length;i++){n=indices[i];if(n>=0){if(!ret){ret=[]}if(!json){ret[i]=cont[n]}else{clazz=cont[n];elem=json[clazz];if(elem&&elem.header){elem=elem.header.customelement;if(elem){ret[i]=elem}}}}}return ret&&ret.length?ret:null};function _convertValue(valType,value){var retValue=value;if(valType===STRING){retValue=value}else if(valType==="number"){retValue=Number(value)}else if(valType==="boolean"){retValue=value.toLowerCase()==="true"}return retValue};function _removeChevrons(tagName){if(tagName){let len=tagName.length-1;let start=tagName.charAt(0)==="<"?1:0;let end=tagName.charAt(len)===">"?len:++len;tagName=tagName.substring(start,end)}return tagName};module.exports=MetaLib;
package/lib/checkage.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * Licensed under The Universal Permissive License (UPL), Version 1.0
4
4
  * as shown at https://oss.oracle.com/licenses/upl/
5
5
  */
6
- const BUILT="2025-05-22T21:01:17.886Z";const MAJOR_RELS=2;function CheckAge(burnedInJetVer,msgCtx){this._jetRels=-1;this._msgCtx=msgCtx;this._burnedInMajor=parseInt(burnedInJetVer.split(".")[0])};CheckAge.prototype.checkAge=function(){var curDate;var buildDate;var buildMonth;var monthsToNow;curDate=new Date;buildDate=BUILT==="@BUILT@"?curDate:new Date(BUILT);buildMonth=buildDate.getMonth()+1;monthsToNow=_getElapsedMonths(buildDate,curDate);if(!monthsToNow){this._jetRels=0}else{this._jetRels=_getReleases(buildMonth,monthsToNow);if(this._jetRels>MAJOR_RELS){this._emitMsg(monthsToNow)}}return this._jetRels};CheckAge.prototype.getJafReleaseCount=function(){return this._jetRels};CheckAge.prototype.getMajorReleaseCount=function(major){if(typeof major==="string"){let a=major.split(".");major=parseInt(a[0])}if(isNaN(major)){return this._jetRels}let estimatedMajor=this._burnedInMajor+this._jetRels;return estimatedMajor-major};CheckAge.prototype._emitMsg=function(old){var INDENT=" ".repeat(12);var s,h,p;if(this._jetRels){s=""+this._jetRels;if(this._jetRels===1){h="has";p=""}else{h="have";p="s"}}else{s="at least one";h="has";p=""}var s=`\nThis version of JAF is ${old} month${old===1?"":"s"} old, and there ${h} been ${s} scheduled public\n`+`${INDENT}major JET release${p}, together with JAF updates and fixes. It is strongly\n`+INDENT+"recommended that you install the latest version of JAF. [JAF-9100]\n";this._msgCtx.warn(s,"JAF-9100",true)};function _getElapsedMonths(start,end){return end.getMonth()-start.getMonth()+12*(end.getFullYear()-start.getFullYear())};function _getReleases(buildMonth,months){var toNextRel,releases=0;if(buildMonth===1){toNextRel=0}else if(buildMonth>1&&buildMonth<7){toNextRel=7-buildMonth}else if(buildMonth===7){toNextRel=0}else{toNextRel=13-buildMonth}if((releases=months-toNextRel)>=0){releases=1+Math.floor(releases/6)}else{releases=0}return releases};module.exports=CheckAge;
6
+ const BUILT="2025-07-03T12:18:56.461Z";const MAJOR_RELS=2;function CheckAge(burnedInJetVer,msgCtx){this._jetRels=-1;this._msgCtx=msgCtx;this._burnedInMajor=parseInt(burnedInJetVer.split(".")[0])};CheckAge.prototype.checkAge=function(){var curDate;var buildDate;var buildMonth;var monthsToNow;curDate=new Date;buildDate=BUILT==="@BUILT@"?curDate:new Date(BUILT);buildMonth=buildDate.getMonth()+1;monthsToNow=_getElapsedMonths(buildDate,curDate);if(!monthsToNow){this._jetRels=0}else{this._jetRels=_getReleases(buildMonth,monthsToNow);if(this._jetRels>MAJOR_RELS){this._emitMsg(monthsToNow)}}return this._jetRels};CheckAge.prototype.getJafReleaseCount=function(){return this._jetRels};CheckAge.prototype.getMajorReleaseCount=function(major){if(typeof major==="string"){let a=major.split(".");major=parseInt(a[0])}if(isNaN(major)){return this._jetRels}let estimatedMajor=this._burnedInMajor+this._jetRels;return estimatedMajor-major};CheckAge.prototype._emitMsg=function(old){var INDENT=" ".repeat(12);var s,h,p;if(this._jetRels){s=""+this._jetRels;if(this._jetRels===1){h="has";p=""}else{h="have";p="s"}}else{s="at least one";h="has";p=""}var s=`\nThis version of JAF is ${old} month${old===1?"":"s"} old, and there ${h} been ${s} scheduled public\n`+`${INDENT}major JET release${p}, together with JAF updates and fixes. It is strongly\n`+INDENT+"recommended that you install the latest version of JAF. [JAF-9100]\n";this._msgCtx.warn(s,"JAF-9100",true)};function _getElapsedMonths(start,end){return end.getMonth()-start.getMonth()+12*(end.getFullYear()-start.getFullYear())};function _getReleases(buildMonth,months){var toNextRel,releases=0;if(buildMonth===1){toNextRel=0}else if(buildMonth>1&&buildMonth<7){toNextRel=7-buildMonth}else if(buildMonth===7){toNextRel=0}else{toNextRel=13-buildMonth}if((releases=months-toNextRel)>=0){releases=1+Math.floor(releases/6)}else{releases=0}return releases};module.exports=CheckAge;
package/lib/defaults.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * Licensed under The Universal Permissive License (UPL), Version 1.0
4
4
  * as shown at https://oss.oracle.com/licenses/upl/
5
5
  */
6
- const defaults={JETVER:"18.0.7".replace(/(\d*\.\d*)(\.\d*)+$/g,"$1")+".0",THEME:"Alta",ECMAVER:14};module.exports=defaults;
6
+ const defaults={JETVER:"18.0.9".replace(/(\d*\.\d*)(\.\d*)+$/g,"$1")+".0",THEME:"Alta",ECMAVER:14};module.exports=defaults;