1if(typeof window==="undefined"||typeof window.BitJsonModel==="undefined"){window.BitJsonModel=class BitJsonModel{constructor(response={}){const{meta,data,isInvalidFormat}=BitJsonModel.normalizeResponse(response);this.response=response;this.status=Number(meta.status??BitJsonModel.DEFAULT_STATUS);this.message=meta.message??meta.msg??"";this.debug=meta.debug??"";this.meta=meta;this.data=data;this.invalidFormat=isInvalidFormat;if(this.invalidFormat){BitJsonModel.#safeConsoleError(`[BitJsonModel] Invalid response format. Expected { data, meta:{status,message,debug} } but got:`,response);this.status=BitJsonModel.DEFAULT_STATUS;if(!this.message){this.message="Invalid response format"}}if(this.debug){BitJsonModel.#safeConsoleDebug("[BitJsonModel.debug]",this.debug)}}get hasData(){return(this.status??0)>0}get isSuccess(){return!this.invalidFormat&&this.status>=0}static#isObject(value){return value!==null&&typeof value==="object"}static normalizeResponse(response){let isInvalidFormat=false;let meta={};let data=null;if(!BitJsonModel.#isObject(response)){isInvalidFormat=true}else if(!("meta"in response)||!BitJsonModel.#isObject(response.meta)){isInvalidFormat=true;meta={};data=response.data??null}else{meta=response.meta??{};data=response.data??null}return{meta:meta,data:data,isInvalidFormat:isInvalidFormat}}static#safeConsoleError(...args){try{console.error(...args)}catch(_){}}static#safeConsoleDebug(...args){try{console.debug(...args)}catch(_){}}static DEFAULT_STATUS=-1};try{module.exports=BitJsonModel}catch(e){}}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.