jamespot-user-api 1.0.157 → 1.0.159
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/documentation/assets/search.js +1 -1
- package/documentation/classes/AdminLicenseApi.html +11 -11
- package/documentation/classes/AdminStoreApi.html +1 -1
- package/documentation/classes/AdminUtilsApi.html +1 -1
- package/documentation/classes/JApplicationApi.html +8 -8
- package/documentation/classes/JArticleApi.html +1 -1
- package/documentation/classes/JAssetReservation.html +1 -1
- package/documentation/classes/JAudienceApi.html +1 -1
- package/documentation/classes/JBaseApi.html +1 -1
- package/documentation/classes/JBookmarkApi.html +1 -1
- package/documentation/classes/JBusinessNetworkingApi.html +1 -1
- package/documentation/classes/JCommunityApi.html +1 -1
- package/documentation/classes/JDiapazoneApi.html +1 -1
- package/documentation/classes/JFaqApi.html +1 -1
- package/documentation/classes/JFileApi.html +5 -5
- package/documentation/classes/JFilebankApi.html +1 -1
- package/documentation/classes/JGlobalApi.html +1 -1
- package/documentation/classes/JGroupApi.html +16 -10
- package/documentation/classes/JIAApi.html +1 -1
- package/documentation/classes/JLandApi.html +1 -1
- package/documentation/classes/JMessengerApi.html +1 -1
- package/documentation/classes/JObjectApi.html +1 -1
- package/documentation/classes/JSearchApi.html +6 -6
- package/documentation/classes/JShareApi.html +1 -1
- package/documentation/classes/JSocialActionApi.html +1 -1
- package/documentation/classes/JTaxonomyApi.html +2 -2
- package/documentation/classes/JUserApi.html +7 -7
- package/documentation/classes/JWedocApi.html +1 -1
- package/documentation/classes/JWidgetApi.html +1 -1
- package/documentation/classes/JamespotUserApi.html +1 -1
- package/documentation/classes/Network.html +1 -1
- package/documentation/classes/TVDisplayApi.html +1 -1
- package/documentation/classes/WindowBrowser.html +1 -1
- package/documentation/enums/GroupModerateStatus.html +1 -0
- package/documentation/enums/StudioApplicationStatus.html +1 -1
- package/documentation/index.html +1 -1
- package/documentation/interfaces/AccessRightObject.html +1 -1
- package/documentation/interfaces/AdminLicenseUser.html +1 -1
- package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
- package/documentation/interfaces/ApiWrapper.html +1 -1
- package/documentation/interfaces/BaseAutocomplete.html +1 -1
- package/documentation/interfaces/BaseMessage.html +1 -1
- package/documentation/interfaces/Category.html +1 -1
- package/documentation/interfaces/FileBankProps.html +1 -1
- package/documentation/interfaces/FolderProps.html +1 -1
- package/documentation/interfaces/ListFilterSpec.html +1 -1
- package/documentation/interfaces/OF.html +1 -1
- package/documentation/interfaces/ObjectListProps.html +1 -1
- package/documentation/interfaces/PagingResults.html +1 -1
- package/documentation/interfaces/RootFolderProps.html +1 -1
- package/documentation/interfaces/SearchCategoryModel.html +1 -1
- package/documentation/interfaces/SearchCategoryValue.html +1 -1
- package/documentation/interfaces/SearchConfig.html +1 -1
- package/documentation/interfaces/SearchFacetModel.html +1 -1
- package/documentation/interfaces/SearchFacetValueModel.html +1 -1
- package/documentation/interfaces/SearchQuery.html +1 -1
- package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
- package/documentation/interfaces/SearchQueryOption.html +1 -1
- package/documentation/interfaces/SearchQueryResult.html +1 -1
- package/documentation/interfaces/SearchQuerySortModel.html +1 -1
- package/documentation/interfaces/SearchResultCatProps.html +1 -1
- package/documentation/interfaces/SearchResultPropsApp.html +1 -1
- package/documentation/interfaces/SearchResultPropsObject.html +1 -1
- package/documentation/interfaces/SpotProps.html +1 -1
- package/documentation/interfaces/TaxonomyCreate.html +1 -1
- package/documentation/interfaces/WindowInterface.html +1 -1
- package/documentation/modules.html +11 -11
- package/lib/jamespot-user-api.js +1 -1
- package/lib/jamespot-user-api.js.map +1 -1
- package/lib/src/apis/group/group.d.ts +28 -10
- package/lib/src/apis/group/group.mock.d.ts +8 -1
- package/lib/src/apis/widget/widget.d.ts +12 -0
- package/lib/src/apis/widget/widget.mock.d.ts +1 -0
- package/lib/src/types/article.d.ts +5 -2
- package/lib/src/types/comment.d.ts +5 -3
- package/lib/src/types/group.d.ts +60 -0
- package/lib/src/types/hook.d.ts +45 -0
- package/lib/src/types/utils.d.ts +4 -0
- package/lib/src/types/widgets.d.ts +43 -2
- package/package.json +1 -1
- package/phpunitMock/spotAddToFavorite-bad.json +7 -0
- package/phpunitMock/spotAddToFavorite-forbidden.json +7 -0
- package/phpunitMock/spotAddToFavorite-success.json +7 -0
- package/phpunitMock/spotGetUserLevelAndRight-default.json +31 -0
- package/phpunitMock/spotRequest-forbidden.json +7 -0
- package/phpunitMock/spotRequest-pending.json +7 -0
- package/phpunitMock/spotRequest-success.json +7 -0
package/lib/jamespot-user-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t={d:(e,s)=>{for(var n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},s={};t.r(s),t.d(s,{ACCESS_REQUEST_ACCEPT:()=>Gs,ACCESS_REQUEST_DENY:()=>Hs,AdminLicenseApi:()=>r,AdminStoreApi:()=>i,AdminUtilsApi:()=>a,JApplicationApi:()=>o,JArticleApi:()=>c,JAssetReservation:()=>d,JAudienceApi:()=>l,JBaseApi:()=>n,JBookmarkApi:()=>p,JBusinessNetworkingApi:()=>h,JCommunityApi:()=>m,JDiapazoneApi:()=>f,JFaqApi:()=>v,JFileApi:()=>y,JFilebankApi:()=>_,JGlobalApi:()=>b,JGroupApi:()=>w,JIAApi:()=>U,JLandApi:()=>O,JMessengerApi:()=>S,JObjectApi:()=>N,JSearchApi:()=>C,JShareApi:()=>E,JSocialActionApi:()=>M,JTaxonomyApi:()=>T,JUserApi:()=>Z,JWedocApi:()=>R,JWidgetApi:()=>D,JamespotUserApi:()=>$,JamespotUserApiInstance:()=>Dn,Network:()=>z,StudioApplicationStatus:()=>e,TVDisplayApi:()=>F,UserLevel:()=>us,WindowBrowser:()=>J,api:()=>Bn,businessContactSchema:()=>xs,deepEqual:()=>Rn,default:()=>$n,extensions:()=>mn,extractTaxonomiesFromObject:()=>Pn,extractTaxonomiesFromObjectAndMapProperty:()=>Ln,extractTaxonomiesFromObjectAndMapUri:()=>Nn,fileCropConfigSchema:()=>Ns,formatImgUrl:()=>pn,getArgs:()=>cn,getExtensionFromName:()=>vn,getFileExtensionFromMimetype:()=>yn,getFileFamily:()=>jn,getFileFamilyFromName:()=>kn,getFormat:()=>dn,getFrom:()=>an,getMimetypeFromExtension:()=>gn,getMimetypeFromName:()=>_n,getSize:()=>un,getTimestamp:()=>on,getUri:()=>rn,getUrl:()=>ln,imageSizeSchema:()=>Ls,jEnsure:()=>en,jFileLittleCropSchema:()=>Us,jFileLittleSchema:()=>Is,jFileRenditionSchema:()=>Ds,jObjectBaseSchema:()=>Ts,jObjectListSchema:()=>Fs,jObjectLittleSchema:()=>Zs,jUserListSchema:()=>ls,jUserLittleSchema:()=>ds,jUserValuesSchema:()=>vs,jUserViewSchema:()=>hs,mimetypeToExt:()=>fn,mimetypes:()=>hn,network:()=>Un,objectTimestamp:()=>bn,padStartTwoDigits:()=>nn,prepareGroupForUpdate:()=>In,removeIfStartsWith:()=>sn,replacePropertiesWithTypes:()=>Fn,resolveFileFamily:()=>Cn,resolveFileMimetype:()=>Sn,resolveFilePath:()=>wn,resolveFileUrl:()=>On,rightsSchema:()=>Ht,suffixIfDoesNotExist:()=>tn,uploadConfigSchema:()=>Ps,userDefaultFieldsTypeSchema:()=>ys,userDirectoryConfigurationSchema:()=>js,userDownloadSchema:()=>$s,userFieldSchema:()=>bs,userFieldsConfigurationTypeSchema:()=>_s,userFieldsSchema:()=>ws,userMapModelSchema:()=>fs,userModelSchema:()=>Ss,userSchema:()=>As,userValuesSchema:()=>ks,validateIsFormatFileLittle:()=>Ms,validateIsFormatHookListType:()=>Qs,validateIsFormatObjectList:()=>Es,validateIsFormatObjectLittle:()=>Rs,validateIsFormatRights:()=>Yt,validateIsFormatUserDirectoryConfiguration:()=>Os,validateIsFormatUserList:()=>ps,validateIsFormatUserMapModel:()=>gs,validateIsFormatUserModel:()=>Cs,validateIsFormatUserView:()=>ms,widgetActiveValueSchema:()=>is,widgetDatePickerValueSchema:()=>rs,widgetDateValueSchema:()=>ss,widgetDatetimeValueSchema:()=>ns,widgetEmailValueSchema:()=>as,widgetNumberValueSchema:()=>ts,widgetTextValueSchema:()=>Xt,widgetTextareaValueSchema:()=>es,widgetUrlValueSchema:()=>os,widgetsValueSchema:()=>cs});class n{constructor(e){this.jApi=e,this.network=e.network}}class r extends n{getLicenseUserStatistics(){return this.network.post({o:"licenseManager",f:"userStatistics"})}assignLicense(e){return this.network.postCSRF({o:"licenseManager",f:"assignLicense",uri:e})}unAssignLicense(e){return this.network.postCSRF({o:"licenseManager",f:"unassignLicense",uri:e})}getAssignmentMode(e){return this.network.post({o:"licenseManager",f:"getAssignmentMode",type:e})}setAssignmentMode(e,t){return this.network.postCSRF({o:"licenseManager",f:"setAssignmentMode",value:t,type:e})}assignPossiblesLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"assignPossiblesLicenses",type:e})}unAssignUnusedLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"unassignUnusedLicenses",type:e})}optimizeLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"optimizeLicenses",type:e})}getObjectsWithoutLicense(e,t){return this.network.post({o:"licenseManager",f:"countObjectsWithoutLicense",type:e,filter:t})}getLicensesNotAssigned(e){return this.network.post({o:"licenseManager",f:"countLicensesNotAssigned",type:e})}getLicensesAssigned(e){return this.network.post({o:"licenseManager",f:"getLicensesAssigned",type:e})}}class i extends n{getItem(e){return this.network.post({o:"adminStore",f:"getItem",uri:e})}checkoutBilling(e){return this.network.postCSRF({o:"adminStore",f:"checkoutBilling",uri:e})}checkoutFinalize(e){return this.network.postCSRF({o:"adminStore",f:"checkoutFinalize",uri:e})}}class a extends n{getApps(){return this.network.post({o:"admin",f:"apps"})}}!function(e){e.local="local",e.installed="installed",e.autosaved="autosaved",e.saved="saved"}(e||(e={}));class o extends n{list(){return this.network.post({o:"studio",f:"list"})}get(e,t){return this.network.post({o:"studio",f:"get",idApp:e,status:t})}install(e){return this.network.postCSRF({o:"studio",f:"install",value:e})}suspend(e){return this.network.postCSRF({o:"studio",f:"suspend",idApp:e})}restart(e){return this.network.postCSRF({o:"studio",f:"restart",idApp:e})}save(t,s,n){if(n===e.saved||n===e.autosaved)return this.network.postCSRF({o:"studio",f:"save",idApp:t,value:s,status:n});throw"Invalid status value"}delete(e,t){return s=this,n=void 0,i=function*(){return this.network.postCSRF({o:"studio",f:"delete",idApp:e,status:t}).then((e=>{if(0===e.error)return e.messages;throw e.messages}))},new((r=void 0)||(r=Promise))((function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function o(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var s;t.done?e(t.value):(s=t.value,s instanceof r?s:new r((function(e){e(s)}))).then(a,o)}c((i=i.apply(s,n||[])).next())}));var s,n,r,i}cssClassList(){return this.network.post({o:"studio",f:"icons"})}}class c extends n{list(e){return this.network.post(Object.assign({o:"objectList",f:"jamespotArticleQueryList"},e))}get(e){return this.network.post(Object.assign({o:"article",f:"get"},e))}create(e,t){return this.network.maybePostToken(Object.assign({o:"article",f:"create",format:null!=t?t:"raw-list"},e))}update(e){return this.network.post(Object.assign(Object.assign({format:"raw-list"},e),{o:"article",f:"update"}))}delete(e){return this.network.postCSRF({o:"article",f:"delete",idArticle:e})}count(e){return this.network.post({o:"article",f:"count",type:e})}getAttachments(e,t,s){return this.network.post({o:"article",f:"getAttachment",idArticle:e,type:t,format:s})}permalink(e){return this.network.post({o:"article",f:"permalink",permalinkId:e})}saveAsDraft(e,t,s){return this.network.post({o:"article",f:"saveAsDraft",form:e,contentType:t,idDraft:s})}getComments(e,t){var s,n;return this.network.post(Object.assign(Object.assign({o:"article",f:"getComments"},e),{attachments:null!==(s=e.attachment)&&void 0!==s&&s,limits:null!==(n=e.limits)&&void 0!==n?n:{start:0,max:1e4},format:null!=t?t:"raw-little"}))}addComment(e,t){return this.network.post(Object.assign(Object.assign({o:"article",f:"addComment"},e),{alertAuthor:Number(e.alertAuthor),sendAlert:Number(e.sendAlert),type:"comment",format:null!=t?t:"raw-little"}))}updateComment(e,t){return this.network.post(Object.assign(Object.assign({o:"article",f:"updateComment"},e),{format:null!=t?t:"raw-little"}))}deleteComment(e){return this.network.postCSRF({o:"comment",f:"delete",idComment:e})}getRead(e){return this.network.post({o:"article",f:"getRead",uri:e})}}var u=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s};class d extends n{configuration(){return this.network.post({o:"assetReservation",f:"configuration"})}createReservation(e){return this.network.postCSRF(Object.assign({o:"assetReservation",f:"createReservation",format:"raw-list"},e))}getReservations(e){var{format:t="raw-list"}=e,s=u(e,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"getReservations",format:t},s))}cancelReservation(e){return this.network.post({o:"assetReservation",f:"cancelReservation",format:"raw-list",idArticle:e})}bookByDate(e){var{format:t="raw-list"}=e,s=u(e,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"BookByDate",format:t},s))}getList(e){var{format:t="raw-list"}=e,s=u(e,["format"]);return this.network.post(Object.assign({o:"objectList",f:"assetReservationList",format:t},s))}}class l extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"audience",q:e}).then((e=>{if(Array.isArray(e.result))return e.result;throw"Bad response from backend"}))}}class p extends n{getFormattedList(e,t){return this.network.post(Object.assign({o:"objectList",f:"bookmarksList",format:t},e))}addFormattedLink(e,t,s){const n=null!=s?s:"list";return this.network.post({o:"custom",f:"actionAdd",type:"bookmarkLink",targetId:e,targetType:t,format:n})}addBookmark(e,t){return this.network.postCSRF(Object.assign({o:"bookmarks",f:"add"},e))}delete(e){return this.network.postCSRF({o:"bookmarks",f:"delete",bookmarkID:e})}rename(e,t,s){return this.network.postCSRF({o:"bookmarks",f:"rename",bookmarkID:e,bookmarkLabel:t,bookmarkUrl:s})}move(e,t,s){return this.network.postCSRF({o:"bookmarks",f:"move",bookmarkID:e,bookmarkReference:t,bookmarkPosition:s})}}class h extends n{getInfos(e,t){return this.network.post({o:"BusinessNetworking",f:"MarkerInfo",id:e,format:null!=t?t:"raw-little"})}}class m extends n{get(e,t){return this.network.post({o:"community",f:"getCommunity",idCommunity:e,format:t||"raw-little"})}sendRequest(e,t){return this.network.post({o:"community",f:"sendRequest",message:e,idUserTo:t})}autocomplete(e){return this.network.post({o:"autocomplete",f:"community",q:e}).then((e=>e.result))}}class f extends n{create(e,t,s,n,r){return this.network.post({o:"article",f:"create",type:e,token:t,title:s,dateStart:n,publishTo:r})}getList(e="",t=[],s=[],n=1,r="raw-list"){return this.network.post({o:"objectList",f:"diapazoneQueryList",query:e,filters:t,orders:s,page:n,format:r})}}var g=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class y extends n{upload(e){const t=new FormData;return t.append("attrName",e.attrName),e.file?t.append(e.attrName,e.file):e.url&&t.append("url",e.url),t.append("token",e.token),this.network.postFile(t)}uploadMany(e){return g(this,void 0,void 0,(function*(){return Promise.all(e.map((e=>this.upload(e))))}))}get(e,t){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"get",idFile:e,format:t})}))}getParent(e,t){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getParent",idFile:e,format:t})}))}getWithHash(e,t,s){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getWithHash",idFile:e,hash:t,format:s})}))}duplicate(e,t,s){return g(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"duplicateFile",idFile:e,title:t,publishTo:s})}))}updateFile(e,t){return g(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"updateFile",idFile:e,title:t})}))}update(e,t,s){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"update",idFile:e,type:t,cropDatas:Object.assign(Object.assign({},s),{rotateBeforeCrop:!0}),killSize:s.killSize,format:"raw-little"})}))}deleteFile(e,t,s,n){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"delete",idFile:e,attrName:t,token:s},n)}))}deleteImage(e,t){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"deleteImage",id:e,type:t})}))}getDownload(e){return this.network.post({o:"file",f:"getDownload",id:e})}generatePreview(e){return this.network.post({o:"file",f:"generatePreview",id:e})}}class v extends n{getCategoriesList(e,t){return this.network.post({o:"objectList",f:"faqQueryList",format:null!=e?e:"raw-list",orders:null!=t?t:[{name:"dateCreation",sort:"ASC"}]})}createCategory(e,t){return this.jApi.article.create(Object.assign(Object.assign({},e),{type:"faq"}),null!=t?t:"raw-view")}updateCategory(e,t){return this.jApi.article.update(Object.assign(Object.assign({},e),{type:"faq",format:null!=t?t:"raw-view"}))}getCategory(e,t){return this.jApi.article.get({idArticle:e,format:null!=t?t:"raw-view"})}deleteCategory(e){return this.jApi.article.delete(e)}checkItem(e,t,s){return this.network.post({o:"faq",f:"checkItem",query:e,page:null!=t?t:1,format:null!=s?s:"raw-list"})}getTaxonomy(){return this.network.post({o:"faq",f:"getFaqTaxonomy"})}getHookProperties(e){return this.network.post({o:"faq",f:"getHookProperties",properties:null!=e?e:["_web"]})}getAccess(){return this.network.post({o:"faq",f:"access"})}createTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-theme"},e),{format:null!=t?t:"raw-view"}))}deleteTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"delete-theme"},e),{format:null!=t?t:"raw-view"}))}updateTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"set-theme"},e),{format:null!=t?t:"raw-view"}))}getEntry(e,t){return this.network.post({o:"faq",f:"get-entry",uri:e,format:null!=t?t:"raw-view"})}deleteEntry(e){return this.jApi.article.delete(e)}createEntry(e,t){return this.jApi.article.create(Object.assign(Object.assign({},e),{idSpot:["content"],type:"faqItem"}),null!=t?t:"raw-view")}addEntry(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-entry"},e),{format:null!=t?t:"raw-view"}))}updateEntry(e,t){return this.jApi.article.update(Object.assign(Object.assign({},e),{type:"faqItem",format:null!=t?t:"raw-view"}))}moveEntry(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-entry"},e),{format:null!=t?t:"raw-view"}))}moveTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-theme"},e),{format:null!=t?t:"raw-view"}))}}class _ extends n{getBanks(e="list"){return this.network.post({o:"fileBank",f:"getBanks",format:e}).then((e=>e.result))}getFolders(e){return this.network.post({o:"fileBank",f:"getFolders",parentURI:e})}getDocuments(e){return this.network.post({o:"fileBank",f:"getDocuments",parentURI:e})}}class b extends n{countAction(e,t){return this.network.post({o:"activityLog",f:"log",count:!0,verb:e,uri:t})}}class w extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"spot",q:e,idToUri:!1}).then((e=>e.result))}create(e,t){return this.network.post(Object.assign(Object.assign({o:"spot",f:"create"},e),{format:t}))}update(e,t){const{spotBanner:s}=e,n=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["spotBanner"]);return this.network.postCSRF(Object.assign(Object.assign({o:"spot",f:"update"},n),{format:t}))}getSpot(e,t){return this.network.post({o:"spot",f:"getSpot",idSpot:e,format:t})}getProperties(e){return this.network.post({o:"spot",f:"getProperties",idSpot:e})}getApplications(){return this.network.post({o:"spot",f:"get-available-widget"})}getCategories(){return this.network.post({o:"spot",f:"get-categories"})}getObjectListJamespotSpotMembers(e,t,s,n=1){return this.network.post({o:"objectListJamespot",f:"SpotMembers",idSpot:e,limit:s,page:n,format:"raw-little",query:t})}list(e){return this.network.post(Object.assign({o:"objectList",f:"jamespotSpotQueryList"},e))}resetNotifications(e){return this.network.post(Object.assign({o:"spot",f:"resetNotifications"},e))}}class k extends n{list(e,t,s,n=[{name:"dateCreation",sort:"DESC"}]){return this.jApi.article.list({type:"aseiClearanceTicket",format:"raw-view",limit:t,page:e,orders:n,filters:s})}requestStatus(e,t,s){return this.network.post({o:"asei",f:"setStatus",uri:e,requestedStatus:t,audience:s})}getDedicatedGroups(){return this.network.post({o:"asei",f:"getDedicatedGroups"})}getConfiguration(){return this.network.post({o:"asei",f:"configuration"})}}class x extends n{tenants(){return this.network.post({o:"drive",f:"getTenants"})}groups(e,t){return this.network.post({o:"drive",f:"getGroups",query:e,filter:t})}sites(){return this.network.post({o:"drive",f:"getSites"})}listAccount(e){return this.network.post({o:"drive",f:"listAccount",service:e})}isAccountLogged(e,t){return this.network.post({o:"drive",f:"isAccountLogged",service:e,id:t})}checkAccountToken(e){return this.network.post({o:"drive",f:"checkAccountToken",service:e})}documents(e,t){return this.network.post({o:"drive",f:"getDocuments",service:e,documentParams:t})}}class j extends n{GetUnclassifiedFiles(e){var t;return this.network.post({o:"objectListMediaLibrary",f:"GetUnclassifiedFiles",format:e.format,page:null!==(t=e.page)&&void 0!==t?t:1,limit:e.limit,nolimit:e.nolimit})}getAccess(){return this.network.post({o:"mediaLibrary",f:"access"})}}class O extends n{getLogs({dateEnd:e,idLogMax:t}){return this.network.post({o:"jLand",f:"adminLogs",dateEnd:e,idLogMax:t})}getStats({map:e,dateStart:t,dateEnd:s}){return this.network.post({o:"jLand",f:"adminStats",map:e,dateStart:t,dateEnd:s})}getAllMapsAsAdmin(e="raw-list,licenses"){return this.network.post({o:"objectListJLand",f:"jLandList",format:e})}createMap(e,t="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},e),{o:"article",f:"create",format:t,type:"jlandmap"}))}}class S extends n{sendMessage(e,t){return this.network.post({o:"messenger",f:"newMessage",idDiscussion:t,msg:{description:e}})}getOrCreateDiscussion(e,t){const s=e<t?`${e}.${t}`:`${t}.${e}`;return this.network.post({o:"messenger",f:"getDiscussion",idDiscussion:s,type:"messengerUser",idUserTo:t})}}class C extends n{getConfig(){return this.network.post({o:"search",f:"getConfig"})}proposition({query:e,format:t},s){return this.network.post({o:"search",f:"proposition",query:e,format:t||"little"},s)}searchQuery(e,t){const{keywords:s,category:n,facetCategories:r,filters:i,page:a,limit:o,sort:c,options:u}=e;return this.network.post({o:"search",f:"query",keywords:s,category:n,facetCategories:r,filters:i,page:a,limit:o,sort:c,options:u},t)}getLastQueries(){return this.network.post({o:"search",f:"getLastQueries"})}getAdminConfig(){return this.network.post({o:"search",f:"getAdminConfig"})}setAdminConfig(e){return this.network.post({o:"search",f:"setAdminConfig",config:e})}}var A=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s};class T extends n{list(){return this.network.post({o:"taxonomy",f:"list",format:"raw-little"}).then((e=>{if(Array.isArray(e.result))return e.result;throw"Bad response from backend"}))}create(e){var{format:t="raw-little"}=e,s=A(e,["format"]);return this.network.post(Object.assign({o:"taxonomy",f:"create",format:t},s))}autocomplete(e,t){return this.network.post({o:"autocomplete",f:"taxonomy",q:t,idTaxonomy:e,idToUri:!1})}autocompleteList(e){var{format:t="autocomplete"}=e,s=A(e,["format"]);return this.network.post(Object.assign({o:"objectListTaxonomy",f:"concept",format:t},s))}autocompleteHierarchy(e){return this.network.post(Object.assign({o:"objectListTaxonomyHierarchy",f:"concept"},e))}}class Z extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"user",q:e,idToUri:!1}).then((e=>e.result))}get(e,t="little",s){return this.network.post({o:"user",f:"get",uri:e,format:t},s)}updateImage(e,t="raw-little"){return this.network.postCSRF({o:"user",f:"updateImage",idFile:e,format:t})}updateBanner(e,t="raw-little"){return this.network.postCSRF({o:"user",f:"updateBanner",idFile:e,format:t})}updateMail(e,t){return this.network.postCSRF({o:"user",f:"editMail",mail:e,password:t})}userUpdateProfile(e){return this.network.postCSRF(Object.assign({o:"user",f:"updateProfile"},e))}configuration(){return this.network.post({o:"userDirectory",f:"configuration"})}fieldsConfiguration(){return this.network.post({o:"user",f:"fieldsConfiguration"})}userList(e,t){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserList"},e),t)}userQueryList(e){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserQueryList"},e))}userMap(e){return this.network.post(Object.assign({o:"objectListJamespot",f:"userMap"},e))}userBusinessContactQueryList(e){return this.network.post(Object.assign({o:"businessContact",f:"queryList"},e))}userCreateBusinessContact(e){const t=Object.assign(Object.assign({},e),{pseudo:e.title,firstName:e.firstname,lastName:e.lastname,champ1:e.field1,champ2:e.field2,champ3:e.field3,champ4:e.field4,champ5:e.field5}),s=Object.assign(Object.assign({},t),{type:"businessContactCard",publishTo:"networkPublic/1"});return this.jApi.article.create(s)}userUpdateBusinessContact(e){const t=Object.assign(Object.assign({},e),{pseudo:e.title,firstName:e.firstname,lastName:e.lastname,champ1:e.field1,champ2:e.field2,champ3:e.field3,champ4:e.field4,champ5:e.field5}),s=Object.assign(Object.assign({},t),{uri:e.uri,publishTo:"networkPublic/1"});return this.jApi.article.update(s)}userDeleteBusinessContact(e){return this.jApi.article.delete(e)}userAddContact(e){return this.network.post({o:"user",f:"addContact",idUser:e})}userRemoveContact(e){return this.network.post({o:"user",f:"removeContact",idUser:e})}signIn(e,t){return this.network.post({o:"user",f:"signIn",mail:e,password:t})}getFields(e,t){return this.network.post({o:"user",f:"getFields",idUser:e,fieldsType:t})}}class R extends n{getFiles(e){return this.network.post(Object.assign({o:"onlyOffice",f:"getFiles"},e))}getFile(e,t){return this.network.post({o:"onlyOffice",f:"getFile",idFile:e,hash:t})}getTemplates(e){return this.network.post({o:"onlyOffice",f:"getTemplates"},e)}deleteFile(e,t){return this.network.postCSRF({o:"onlyOffice",f:"deleteFile",idFile:e,withParent:t})}createFile(e,t,s){return this.network.postCSRF({o:"onlyOffice",f:"createFile",title:e,type:t,publishTo:s})}updateFile(e,t){return this.network.postCSRF({o:"onlyOffice",f:"updateFile",idFile:e,title:t})}createVersion(e){return this.network.post({o:"onlyOffice",f:"createVersion",idFile:e})}setAccessRequest(e,t,s,n){return this.network.postCSRF({o:"onlyOffice",f:"setAccessRequest",uri:e,idUser:t,requestAccessValue:s,requestResponseMessage:n})}getAccessRequest(e,t){return this.network.post({o:"onlyOffice",f:"getAccessRequest",format:"raw-little",uri:e,idUser:t})}askAccess(e,t,s){return this.network.postCSRF({o:"onlyOffice",f:"askAccess",uri:e,askAccess:t,askMessage:s})}}class F extends n{createChannel(e,t="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},e),{o:"article",f:"create",format:t,type:"tvDisplayChannel"}))}getChannel(e){return this.network.post(Object.assign(Object.assign({},e),{o:"tvDisplay",f:"getChannel"}))}getConfigureChannel(e){return this.network.post(Object.assign(Object.assign({},e),{o:"tvDisplay",f:"getConfigureChannel"}))}}class E extends n{contentObjectLinks(e){return this.network.post({o:"shared",f:"contentObjectLinks",format:"raw-little",uri:e})}contentSetObjectAccessRule(e,t,s){return this.network.postCSRF({o:"shared",f:"contentSetObjectAccessRule",format:"raw-little",uri:e,rule:t,hash:s})}}var P=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class L extends n{SaveAnimationConfiguration(e){return P(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"saveConfiguration",animation:e})}))}DeleteAnimation(){return P(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"deleteAnimation"})}))}GetCurrentAnimation(){return P(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getConfiguration"})}))}GetCurrentAnimationApp(){return P(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getConfigurationApp"})}))}ToggleAnimationActive(){return P(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"toggleAnimationActive"})}))}GetAnimationActive(){return P(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getAnimationActive"})}))}}class N extends n{getObject(e){return this.network.post({o:"object",f:"getObject",uri:e})}setAccess(e,t,s,n){return this.network.post({o:"object",f:"setAccess",uri:e,access:t,message:s,generalAccessRule:n})}getAccess(e){return this.network.post({o:"object",f:"getAccess",uri:e})}getAccessHash(e){return this.network.post({o:"object",f:"getAccessHash",uri:e})}}class I extends n{getFileBanks(e){return this.network.post({o:"file-sync",f:"getFileBanks"},e)}saveFileBanks(e){return this.network.post({o:"file-sync",f:"saveFileBanks",fileBanks:e})}getUserQuota(e){return this.network.post({o:"file-sync",f:"getUserQuota"},e)}getAdminSpots(e,t){return this.network.post(Object.assign({o:"objectList",f:"fileSyncAdminSpots"},e),t)}}class M extends n{getUsers(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"getUsers"},e),{format:null!=t?t:"raw-list"}))}add(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"add"},e),{format:null!=t?t:"raw-little"}))}remove(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"remove"},e),{format:null!=t?t:"raw-little"}))}}class U extends n{textEnhancement({text:e,capacity:t}){return this.network.post({o:"jia",f:"textEnhancement",text:e,capacity:t})}}class D extends n{responseUserList(e,t,s){return this.network.post({o:"widget",f:"responseUserList",uri:e,uniqid:t,page:s})}}class ${constructor(e){this.version="1.0",this.network=e,this.admin={license:new r(this),store:new i(this),utils:new a(this)},this.application=new o(this),this.article=new c(this),this.asei=new k(this),this.assetReservation=new d(this),this.audience=new l(this),this.bookmark=new p(this),this.businessNetworking=new h(this),this.community=new m(this),this.diapazone=new f(this),this.drive=new x(this),this.faq=new v(this),this.file=new y(this),this.filebank=new _(this),this.fileSync=new I(this),this.global=new b(this),this.group=new w(this),this.jia=new U(this),this.jland=new O(this),this.mediaLibrary=new j(this),this.messenger=new S(this),this.object=new N(this),this.search=new C(this),this.share=new E(this),this.socialAction=new M(this),this.taxonomy=new T(this),this.tvDisplay=new F(this),this.user=new Z(this),this.wedoc=new R(this),this.widget=new D(this),this.animations=new L(this)}}var B=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class z{constructor(e,t="api-front"){this.window=e,this.action=t}static _formatPostOptions(e){const t=e?{body:JSON.stringify(e)}:void 0;return Object.assign({method:"POST",credentials:"same-origin"},t)}getUrl(e,t){return B(this,void 0,void 0,(function*(){const s=yield this.window.getBackendUrl();let n;try{n=new URL(`/${this.action}/${e}/${t}`,s).href}catch(r){n=`${s}/${this.action}/${e}/${t}`}return n}))}getHostname(){return B(this,void 0,void 0,(function*(){const e=(yield this.window.getBackendUrl()).split("//");return e.length>1?e[1]:e[0]}))}fetch(e,t){var{o:s,f:n}=e,r=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["o","f"]);return B(this,void 0,void 0,(function*(){void 0===t&&(t=null);const e=yield this.getUrl(s,n);return this.window.fetch(e,Object.assign(Object.assign({},z._formatPostOptions(r)),{signal:t}))}))}post(e,t){return this.fetch(e,t).then((e=>e.json())).then((e=>{if(0===e.error)return e;throw{error:e.error,errorMsg:e.errorMsg,messages:e.messages}})).catch((e=>{if(t&&t.aborted)throw{error:-1,aborted:!0};throw e}))}postFile(e){return B(this,void 0,void 0,(function*(){const t=yield this.getUrl("file","create");if(e.append("format","raw-little"),!e.has("token")){const{result:t}=yield this.token();e.append("token",t)}const s=e.get("token");return s&&"string"==typeof s?this.window.fetch(t,{method:"POST",credentials:"same-origin",body:e}).then((e=>e.json())).then((e=>({response:e,token:s}))):Promise.reject("Missing token")}))}postCSRF(e){return this.tokenCSRF().then((t=>this.post(Object.assign(e,{tokenCSRF:t.result}))))}postToken(e){return this.token().then((t=>this.post(Object.assign(e,{token:t.result}))))}maybePostToken(e){return"token"in e&&e.token?this.post(e):this.postToken(e)}token(){return this.post({o:"misc",f:"token"})}tokenCSRF(){return this.post({o:"misc",f:"tokenCSRF"})}}var q,V;class J{getBackendUrl(){return e=this,t=void 0,n=function*(){const e=window.location;return`${e.protocol}//${e.host}`},new((s=void 0)||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}));var e,t,s,n}fetch(e,t){return window.fetch(e,t)}}!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const s of e)t[s]=s;return t},e.getValidEnumValues=t=>{const s=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of s)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(s);return t},e.find=(e,t)=>{for(const s of e)if(t(s))return s},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(q||(q={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(V||(V={}));const W=q.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),K=e=>{switch(typeof e){case"undefined":return W.undefined;case"string":return W.string;case"number":return isNaN(e)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(e)?W.array:null===e?W.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?W.promise:"undefined"!=typeof Map&&e instanceof Map?W.map:"undefined"!=typeof Set&&e instanceof Set?W.set:"undefined"!=typeof Date&&e instanceof Date?W.date:W.object;default:return W.unknown}},Q=q.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class G extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},s={_errors:[]},n=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(n);else if("invalid_return_type"===r.code)n(r.returnTypeError);else if("invalid_arguments"===r.code)n(r.argumentsError);else if(0===r.path.length)s._errors.push(t(r));else{let e=s,n=0;for(;n<r.path.length;){const s=r.path[n];n===r.path.length-1?(e[s]=e[s]||{_errors:[]},e[s]._errors.push(t(r))):e[s]=e[s]||{_errors:[]},e=e[s],n++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,q.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}G.create=e=>new G(e);const H=(e,t)=>{let s;switch(e.code){case Q.invalid_type:s=e.received===W.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Q.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,q.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:s=`Unrecognized key(s) in object: ${q.joinValues(e.keys,", ")}`;break;case Q.invalid_union:s="Invalid input";break;case Q.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${q.joinValues(e.options)}`;break;case Q.invalid_enum_value:s=`Invalid enum value. Expected ${q.joinValues(e.options)}, received '${e.received}'`;break;case Q.invalid_arguments:s="Invalid function arguments";break;case Q.invalid_return_type:s="Invalid function return type";break;case Q.invalid_date:s="Invalid date";break;case Q.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:q.assertNever(e.validation):s="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Q.too_small:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Q.too_big:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Q.custom:s="Invalid input";break;case Q.invalid_intersection_types:s="Intersection results could not be merged";break;case Q.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case Q.not_finite:s="Number must be finite";break;default:s=t.defaultError,q.assertNever(e)}return{message:s}};let Y=H;function X(){return Y}const ee=e=>{const{data:t,path:s,errorMaps:n,issueData:r}=e,i=[...s,...r.path||[]],a={...r,path:i};let o="";const c=n.filter((e=>!!e)).slice().reverse();for(const e of c)o=e(a,{data:t,defaultError:o}).message;return{...r,path:i,message:r.message||o}};function te(e,t){const s=ee({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,X(),H].filter((e=>!!e))});e.common.issues.push(s)}class se{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if("aborted"===n.status)return ne;"dirty"===n.status&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const e of t)s.push({key:await e.key,value:await e.value});return se.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:t,value:r}=n;if("aborted"===t.status)return ne;if("aborted"===r.status)return ne;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!n.alwaysSet||(s[t.value]=r.value)}return{status:e.value,value:s}}}const ne=Object.freeze({status:"aborted"}),re=e=>({status:"dirty",value:e}),ie=e=>({status:"valid",value:e}),ae=e=>"aborted"===e.status,oe=e=>"dirty"===e.status,ce=e=>"valid"===e.status,ue=e=>"undefined"!=typeof Promise&&e instanceof Promise;var de;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(de||(de={}));class le{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const pe=(e,t)=>{if(ce(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new G(e.common.issues);return this._error=t,this._error}}};function he(e){if(!e)return{};const{errorMap:t,invalid_type_error:s,required_error:n,description:r}=e;if(t&&(s||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:r}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=s?s:t.defaultError},description:r}}class me{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return K(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:K(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new se,ctx:{common:e.parent.common,data:e.data,parsedType:K(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ue(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:null!==(s=null==t?void 0:t.async)&&void 0!==s&&s,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:K(e)},r=this._parseSync({data:e,path:n.path,parent:n});return pe(n,r)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:K(e)},n=this._parse({data:e,path:s.path,parent:s}),r=await(ue(n)?n:Promise.resolve(n));return pe(s,r)}refine(e,t){const s=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const r=e(t),i=()=>n.addIssue({code:Q.custom,...s(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(i(),!1))):!!r||(i(),!1)}))}refinement(e,t){return this._refinement(((s,n)=>!!e(s)||(n.addIssue("function"==typeof t?t(s,n):t),!1)))}_refinement(e){return new tt({schema:this,typeName:ht.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return st.create(this,this._def)}nullable(){return nt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ne.create(this,this._def)}promise(){return et.create(this,this._def)}or(e){return Ue.create([this,e],this._def)}and(e){return ze.create(this,e,this._def)}transform(e){return new tt({...he(this._def),schema:this,typeName:ht.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new rt({...he(this._def),innerType:this,defaultValue:t,typeName:ht.ZodDefault})}brand(){return new ct({typeName:ht.ZodBranded,type:this,...he(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new it({...he(this._def),innerType:this,catchValue:t,typeName:ht.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ut.create(this,e)}readonly(){return dt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const fe=/^c[^\s-]{8,}$/i,ge=/^[a-z][a-z0-9]*$/,ye=/^[0-9A-HJKMNP-TV-Z]{26}$/,ve=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_e=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let be;const we=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ke=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class xe extends me{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==W.string){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.string,received:t.parsedType}),ne}const t=new se;let s;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Q.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Q.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const n=e.data.length>a.value,r=e.data.length<a.value;(n||r)&&(s=this._getOrReturnCtx(e,s),n?te(s,{code:Q.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&te(s,{code:Q.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)_e.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"email",code:Q.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)be||(be=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),be.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"emoji",code:Q.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)ve.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"uuid",code:Q.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)fe.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"cuid",code:Q.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)ge.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"cuid2",code:Q.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)ye.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"ulid",code:Q.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch(n){s=this._getOrReturnCtx(e,s),te(s,{validation:"url",code:Q.invalid_string,message:a.message}),t.dirty()}else"regex"===a.kind?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"regex",code:Q.invalid_string,message:a.message}),t.dirty())):"trim"===a.kind?e.data=e.data.trim():"includes"===a.kind?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),te(s,{code:Q.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty()):"toLowerCase"===a.kind?e.data=e.data.toLowerCase():"toUpperCase"===a.kind?e.data=e.data.toUpperCase():"startsWith"===a.kind?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),te(s,{code:Q.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty()):"endsWith"===a.kind?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),te(s,{code:Q.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty()):"datetime"===a.kind?((i=a).precision?i.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`):0===i.precision?i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{code:Q.invalid_string,validation:"datetime",message:a.message}),t.dirty()):"ip"===a.kind?(n=e.data,("v4"!==(r=a.version)&&r||!we.test(n))&&("v6"!==r&&r||!ke.test(n))&&(s=this._getOrReturnCtx(e,s),te(s,{validation:"ip",code:Q.invalid_string,message:a.message}),t.dirty())):q.assertNever(a);var n,r,i;return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement((t=>e.test(t)),{validation:t,code:Q.invalid_string,...de.errToObj(s)})}_addCheck(e){return new xe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...de.errToObj(e)})}url(e){return this._addCheck({kind:"url",...de.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...de.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...de.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...de.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...de.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...de.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...de.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...de.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...de.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...de.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...de.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...de.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...de.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...de.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...de.errToObj(t)})}nonempty(e){return this.min(1,de.errToObj(e))}trim(){return new xe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new xe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new xe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function je(e,t){const s=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=s>n?s:n;return parseInt(e.toFixed(r).replace(".",""))%parseInt(t.toFixed(r).replace(".",""))/Math.pow(10,r)}xe.create=e=>{var t;return new xe({checks:[],typeName:ht.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...he(e)})};class Oe extends me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==W.number){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.number,received:t.parsedType}),ne}let t;const s=new se;for(const n of this._def.checks)"int"===n.kind?q.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),te(t,{code:Q.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),te(t,{code:Q.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),te(t,{code:Q.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):"multipleOf"===n.kind?0!==je(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),te(t,{code:Q.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),te(t,{code:Q.not_finite,message:n.message}),s.dirty()):q.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,de.toString(t))}gt(e,t){return this.setLimit("min",e,!1,de.toString(t))}lte(e,t){return this.setLimit("max",e,!0,de.toString(t))}lt(e,t){return this.setLimit("max",e,!1,de.toString(t))}setLimit(e,t,s,n){return new Oe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:de.toString(n)}]})}_addCheck(e){return new Oe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:de.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:de.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:de.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&q.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Oe.create=e=>new Oe({checks:[],typeName:ht.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...he(e)});class Se extends me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==W.bigint){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.bigint,received:t.parsedType}),ne}let t;const s=new se;for(const n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),te(t,{code:Q.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),te(t,{code:Q.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),te(t,{code:Q.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):q.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,de.toString(t))}gt(e,t){return this.setLimit("min",e,!1,de.toString(t))}lte(e,t){return this.setLimit("max",e,!0,de.toString(t))}lt(e,t){return this.setLimit("max",e,!1,de.toString(t))}setLimit(e,t,s,n){return new Se({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:de.toString(n)}]})}_addCheck(e){return new Se({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:de.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Se.create=e=>{var t;return new Se({checks:[],typeName:ht.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...he(e)})};class Ce extends me{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==W.boolean){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.boolean,received:t.parsedType}),ne}return ie(e.data)}}Ce.create=e=>new Ce({typeName:ht.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...he(e)});class Ae extends me{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==W.date){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.date,received:t.parsedType}),ne}if(isNaN(e.data.getTime()))return te(this._getOrReturnCtx(e),{code:Q.invalid_date}),ne;const t=new se;let s;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Q.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Q.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):q.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ae({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:de.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:de.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Ae.create=e=>new Ae({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ht.ZodDate,...he(e)});class Te extends me{_parse(e){if(this._getType(e)!==W.symbol){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.symbol,received:t.parsedType}),ne}return ie(e.data)}}Te.create=e=>new Te({typeName:ht.ZodSymbol,...he(e)});class Ze extends me{_parse(e){if(this._getType(e)!==W.undefined){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.undefined,received:t.parsedType}),ne}return ie(e.data)}}Ze.create=e=>new Ze({typeName:ht.ZodUndefined,...he(e)});class Re extends me{_parse(e){if(this._getType(e)!==W.null){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.null,received:t.parsedType}),ne}return ie(e.data)}}Re.create=e=>new Re({typeName:ht.ZodNull,...he(e)});class Fe extends me{constructor(){super(...arguments),this._any=!0}_parse(e){return ie(e.data)}}Fe.create=e=>new Fe({typeName:ht.ZodAny,...he(e)});class Ee extends me{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ie(e.data)}}Ee.create=e=>new Ee({typeName:ht.ZodUnknown,...he(e)});class Pe extends me{_parse(e){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.never,received:t.parsedType}),ne}}Pe.create=e=>new Pe({typeName:ht.ZodNever,...he(e)});class Le extends me{_parse(e){if(this._getType(e)!==W.undefined){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.void,received:t.parsedType}),ne}return ie(e.data)}}Le.create=e=>new Le({typeName:ht.ZodVoid,...he(e)});class Ne extends me{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==W.array)return te(t,{code:Q.invalid_type,expected:W.array,received:t.parsedType}),ne;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,r=t.data.length<n.exactLength.value;(e||r)&&(te(t,{code:e?Q.too_big:Q.too_small,minimum:r?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(te(t,{code:Q.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(te(t,{code:Q.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map(((e,s)=>n.type._parseAsync(new le(t,e,t.path,s))))).then((e=>se.mergeArray(s,e)));const r=[...t.data].map(((e,s)=>n.type._parseSync(new le(t,e,t.path,s))));return se.mergeArray(s,r)}get element(){return this._def.type}min(e,t){return new Ne({...this._def,minLength:{value:e,message:de.toString(t)}})}max(e,t){return new Ne({...this._def,maxLength:{value:e,message:de.toString(t)}})}length(e,t){return new Ne({...this._def,exactLength:{value:e,message:de.toString(t)}})}nonempty(e){return this.min(1,e)}}function Ie(e){if(e instanceof Me){const t={};for(const s in e.shape){const n=e.shape[s];t[s]=st.create(Ie(n))}return new Me({...e._def,shape:()=>t})}return e instanceof Ne?new Ne({...e._def,type:Ie(e.element)}):e instanceof st?st.create(Ie(e.unwrap())):e instanceof nt?nt.create(Ie(e.unwrap())):e instanceof qe?qe.create(e.items.map((e=>Ie(e)))):e}Ne.create=(e,t)=>new Ne({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ht.ZodArray,...he(t)});class Me extends me{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=q.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==W.object){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.object,received:t.parsedType}),ne}const{status:t,ctx:s}=this._processInputParams(e),{shape:n,keys:r}=this._getCached(),i=[];if(!(this._def.catchall instanceof Pe&&"strip"===this._def.unknownKeys))for(const e in s.data)r.includes(e)||i.push(e);const a=[];for(const e of r){const t=n[e],r=s.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new le(s,r,s.path,e)),alwaysSet:e in s.data})}if(this._def.catchall instanceof Pe){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)a.push({key:{status:"valid",value:e},value:{status:"valid",value:s.data[e]}});else if("strict"===e)i.length>0&&(te(s,{code:Q.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const n=s.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new le(s,n,s.path,t)),alwaysSet:t in s.data})}}return s.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of a){const s=await t.key;e.push({key:s,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>se.mergeObjectSync(t,e))):se.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return de.errToObj,new Me({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,s)=>{var n,r,i,a;const o=null!==(i=null===(r=(n=this._def).errorMap)||void 0===r?void 0:r.call(n,t,s).message)&&void 0!==i?i:s.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=de.errToObj(e).message)&&void 0!==a?a:o}:{message:o}}}:{}})}strip(){return new Me({...this._def,unknownKeys:"strip"})}passthrough(){return new Me({...this._def,unknownKeys:"passthrough"})}extend(e){return new Me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ht.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Me({...this._def,catchall:e})}pick(e){const t={};return q.objectKeys(e).forEach((s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])})),new Me({...this._def,shape:()=>t})}omit(e){const t={};return q.objectKeys(this.shape).forEach((s=>{e[s]||(t[s]=this.shape[s])})),new Me({...this._def,shape:()=>t})}deepPartial(){return Ie(this)}partial(e){const t={};return q.objectKeys(this.shape).forEach((s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()})),new Me({...this._def,shape:()=>t})}required(e){const t={};return q.objectKeys(this.shape).forEach((s=>{if(e&&!e[s])t[s]=this.shape[s];else{let e=this.shape[s];for(;e instanceof st;)e=e._def.innerType;t[s]=e}})),new Me({...this._def,shape:()=>t})}keyof(){return He(q.objectKeys(this.shape))}}Me.create=(e,t)=>new Me({shape:()=>e,unknownKeys:"strip",catchall:Pe.create(),typeName:ht.ZodObject,...he(t)}),Me.strictCreate=(e,t)=>new Me({shape:()=>e,unknownKeys:"strict",catchall:Pe.create(),typeName:ht.ZodObject,...he(t)}),Me.lazycreate=(e,t)=>new Me({shape:e,unknownKeys:"strip",catchall:Pe.create(),typeName:ht.ZodObject,...he(t)});class Ue extends me{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;if(t.common.async)return Promise.all(s.map((async e=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const s of e)if("dirty"===s.result.status)return t.common.issues.push(...s.ctx.common.issues),s.result;const s=e.map((e=>new G(e.ctx.common.issues)));return te(t,{code:Q.invalid_union,unionErrors:s}),ne}));{let e;const n=[];for(const r of s){const s={...t,common:{...t.common,issues:[]},parent:null},i=r._parseSync({data:t.data,path:t.path,parent:s});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:s}),s.common.issues.length&&n.push(s.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=n.map((e=>new G(e)));return te(t,{code:Q.invalid_union,unionErrors:r}),ne}}get options(){return this._def.options}}Ue.create=(e,t)=>new Ue({options:e,typeName:ht.ZodUnion,...he(t)});const De=e=>e instanceof Qe?De(e.schema):e instanceof tt?De(e.innerType()):e instanceof Ge?[e.value]:e instanceof Ye?e.options:e instanceof Xe?Object.keys(e.enum):e instanceof rt?De(e._def.innerType):e instanceof Ze?[void 0]:e instanceof Re?[null]:null;class $e extends me{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.object)return te(t,{code:Q.invalid_type,expected:W.object,received:t.parsedType}),ne;const s=this.discriminator,n=t.data[s],r=this.optionsMap.get(n);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(te(t,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),ne)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const s of t){const t=De(s.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,s)}}return new $e({typeName:ht.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...he(s)})}}function Be(e,t){const s=K(e),n=K(t);if(e===t)return{valid:!0,data:e};if(s===W.object&&n===W.object){const s=q.objectKeys(t),n=q.objectKeys(e).filter((e=>-1!==s.indexOf(e))),r={...e,...t};for(const s of n){const n=Be(e[s],t[s]);if(!n.valid)return{valid:!1};r[s]=n.data}return{valid:!0,data:r}}if(s===W.array&&n===W.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let n=0;n<e.length;n++){const r=Be(e[n],t[n]);if(!r.valid)return{valid:!1};s.push(r.data)}return{valid:!0,data:s}}return s===W.date&&n===W.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ze extends me{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(e,n)=>{if(ae(e)||ae(n))return ne;const r=Be(e.value,n.value);return r.valid?((oe(e)||oe(n))&&t.dirty(),{status:t.value,value:r.data}):(te(s,{code:Q.invalid_intersection_types}),ne)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ze.create=(e,t,s)=>new ze({left:e,right:t,typeName:ht.ZodIntersection,...he(s)});class qe extends me{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==W.array)return te(s,{code:Q.invalid_type,expected:W.array,received:s.parsedType}),ne;if(s.data.length<this._def.items.length)return te(s,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ne;!this._def.rest&&s.data.length>this._def.items.length&&(te(s,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new le(s,e,s.path,t)):null})).filter((e=>!!e));return s.common.async?Promise.all(n).then((e=>se.mergeArray(t,e))):se.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new qe({...this._def,rest:e})}}qe.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new qe({items:e,typeName:ht.ZodTuple,rest:null,...he(t)})};class Ve extends me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==W.object)return te(s,{code:Q.invalid_type,expected:W.object,received:s.parsedType}),ne;const n=[],r=this._def.keyType,i=this._def.valueType;for(const e in s.data)n.push({key:r._parse(new le(s,e,s.path,e)),value:i._parse(new le(s,s.data[e],s.path,e))});return s.common.async?se.mergeObjectAsync(t,n):se.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return new Ve(t instanceof me?{keyType:e,valueType:t,typeName:ht.ZodRecord,...he(s)}:{keyType:xe.create(),valueType:e,typeName:ht.ZodRecord,...he(t)})}}class Je extends me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==W.map)return te(s,{code:Q.invalid_type,expected:W.map,received:s.parsedType}),ne;const n=this._def.keyType,r=this._def.valueType,i=[...s.data.entries()].map((([e,t],i)=>({key:n._parse(new le(s,e,s.path,[i,"key"])),value:r._parse(new le(s,t,s.path,[i,"value"]))})));if(s.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const s of i){const n=await s.key,r=await s.value;if("aborted"===n.status||"aborted"===r.status)return ne;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const s of i){const n=s.key,r=s.value;if("aborted"===n.status||"aborted"===r.status)return ne;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}}}Je.create=(e,t,s)=>new Je({valueType:t,keyType:e,typeName:ht.ZodMap,...he(s)});class We extends me{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==W.set)return te(s,{code:Q.invalid_type,expected:W.set,received:s.parsedType}),ne;const n=this._def;null!==n.minSize&&s.data.size<n.minSize.value&&(te(s,{code:Q.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&s.data.size>n.maxSize.value&&(te(s,{code:Q.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const r=this._def.valueType;function i(e){const s=new Set;for(const n of e){if("aborted"===n.status)return ne;"dirty"===n.status&&t.dirty(),s.add(n.value)}return{status:t.value,value:s}}const a=[...s.data.values()].map(((e,t)=>r._parse(new le(s,e,s.path,t))));return s.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new We({...this._def,minSize:{value:e,message:de.toString(t)}})}max(e,t){return new We({...this._def,maxSize:{value:e,message:de.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}We.create=(e,t)=>new We({valueType:e,minSize:null,maxSize:null,typeName:ht.ZodSet,...he(t)});class Ke extends me{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.function)return te(t,{code:Q.invalid_type,expected:W.function,received:t.parsedType}),ne;function s(e,s){return ee({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,X(),H].filter((e=>!!e)),issueData:{code:Q.invalid_arguments,argumentsError:s}})}function n(e,s){return ee({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,X(),H].filter((e=>!!e)),issueData:{code:Q.invalid_return_type,returnTypeError:s}})}const r={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof et){const e=this;return ie((async function(...t){const a=new G([]),o=await e._def.args.parseAsync(t,r).catch((e=>{throw a.addIssue(s(t,e)),a})),c=await Reflect.apply(i,this,o);return await e._def.returns._def.type.parseAsync(c,r).catch((e=>{throw a.addIssue(n(c,e)),a}))}))}{const e=this;return ie((function(...t){const a=e._def.args.safeParse(t,r);if(!a.success)throw new G([s(t,a.error)]);const o=Reflect.apply(i,this,a.data),c=e._def.returns.safeParse(o,r);if(!c.success)throw new G([n(o,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ke({...this._def,args:qe.create(e).rest(Ee.create())})}returns(e){return new Ke({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new Ke({args:e||qe.create([]).rest(Ee.create()),returns:t||Ee.create(),typeName:ht.ZodFunction,...he(s)})}}class Qe extends me{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Qe.create=(e,t)=>new Qe({getter:e,typeName:ht.ZodLazy,...he(t)});class Ge extends me{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return te(t,{received:t.data,code:Q.invalid_literal,expected:this._def.value}),ne}return{status:"valid",value:e.data}}get value(){return this._def.value}}function He(e,t){return new Ye({values:e,typeName:ht.ZodEnum,...he(t)})}Ge.create=(e,t)=>new Ge({value:e,typeName:ht.ZodLiteral,...he(t)});class Ye extends me{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),s=this._def.values;return te(t,{expected:q.joinValues(s),received:t.parsedType,code:Q.invalid_type}),ne}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return te(t,{received:t.data,code:Q.invalid_enum_value,options:s}),ne}return ie(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return Ye.create(e)}exclude(e){return Ye.create(this.options.filter((t=>!e.includes(t))))}}Ye.create=He;class Xe extends me{_parse(e){const t=q.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==W.string&&s.parsedType!==W.number){const e=q.objectValues(t);return te(s,{expected:q.joinValues(e),received:s.parsedType,code:Q.invalid_type}),ne}if(-1===t.indexOf(e.data)){const e=q.objectValues(t);return te(s,{received:s.data,code:Q.invalid_enum_value,options:e}),ne}return ie(e.data)}get enum(){return this._def.values}}Xe.create=(e,t)=>new Xe({values:e,typeName:ht.ZodNativeEnum,...he(t)});class et extends me{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.promise&&!1===t.common.async)return te(t,{code:Q.invalid_type,expected:W.promise,received:t.parsedType}),ne;const s=t.parsedType===W.promise?t.data:Promise.resolve(t.data);return ie(s.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}et.create=(e,t)=>new et({type:e,typeName:ht.ZodPromise,...he(t)});class tt extends me{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ht.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,r={addIssue:e=>{te(s,e),e.fatal?t.abort():t.dirty()},get path(){return s.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===n.type){const e=n.transform(s.data,r);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(s.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===s.common.async){const n=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===n.status?ne:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((s=>"aborted"===s.status?ne:("dirty"===s.status&&t.dirty(),e(s.value).then((()=>({status:t.value,value:s.value}))))))}if("transform"===n.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ce(e))return e;const i=n.transform(e.value,r);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>ce(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}q.assertNever(n)}}tt.create=(e,t,s)=>new tt({schema:e,typeName:ht.ZodEffects,effect:t,...he(s)}),tt.createWithPreprocess=(e,t,s)=>new tt({schema:t,effect:{type:"preprocess",transform:e},typeName:ht.ZodEffects,...he(s)});class st extends me{_parse(e){return this._getType(e)===W.undefined?ie(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}st.create=(e,t)=>new st({innerType:e,typeName:ht.ZodOptional,...he(t)});class nt extends me{_parse(e){return this._getType(e)===W.null?ie(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nt.create=(e,t)=>new nt({innerType:e,typeName:ht.ZodNullable,...he(t)});class rt extends me{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===W.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}rt.create=(e,t)=>new rt({innerType:e,typeName:ht.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...he(t)});class it extends me{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return ue(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new G(s.common.issues)},input:s.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new G(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}it.create=(e,t)=>new it({innerType:e,typeName:ht.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...he(t)});class at extends me{_parse(e){if(this._getType(e)!==W.nan){const t=this._getOrReturnCtx(e);return te(t,{code:Q.invalid_type,expected:W.nan,received:t.parsedType}),ne}return{status:"valid",value:e.data}}}at.create=e=>new at({typeName:ht.ZodNaN,...he(e)});const ot=Symbol("zod_brand");class ct extends me{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class ut extends me{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?ne:"dirty"===e.status?(t.dirty(),re(e.value)):this._def.out._parseAsync({data:e.value,path:s.path,parent:s})})();{const e=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?ne:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:s.path,parent:s})}}static create(e,t){return new ut({in:e,out:t,typeName:ht.ZodPipeline})}}class dt extends me{_parse(e){const t=this._def.innerType._parse(e);return ce(t)&&(t.value=Object.freeze(t.value)),t}}dt.create=(e,t)=>new dt({innerType:e,typeName:ht.ZodReadonly,...he(t)});const lt=(e,t={},s)=>e?Fe.create().superRefine(((n,r)=>{var i,a;if(!e(n)){const e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,o=null===(a=null!==(i=e.fatal)&&void 0!==i?i:s)||void 0===a||a,c="string"==typeof e?{message:e}:e;r.addIssue({code:"custom",...c,fatal:o})}})):Fe.create(),pt={object:Me.lazycreate};var ht;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(ht||(ht={}));const mt=xe.create,ft=Oe.create,gt=at.create,yt=Se.create,vt=Ce.create,_t=Ae.create,bt=Te.create,wt=Ze.create,kt=Re.create,xt=Fe.create,jt=Ee.create,Ot=Pe.create,St=Le.create,Ct=Ne.create,At=Me.create,Tt=Me.strictCreate,Zt=Ue.create,Rt=$e.create,Ft=ze.create,Et=qe.create,Pt=Ve.create,Lt=Je.create,Nt=We.create,It=Ke.create,Mt=Qe.create,Ut=Ge.create,Dt=Ye.create,$t=Xe.create,Bt=et.create,zt=tt.create,qt=st.create,Vt=nt.create,Jt=tt.createWithPreprocess,Wt=ut.create,Kt={string:e=>xe.create({...e,coerce:!0}),number:e=>Oe.create({...e,coerce:!0}),boolean:e=>Ce.create({...e,coerce:!0}),bigint:e=>Se.create({...e,coerce:!0}),date:e=>Ae.create({...e,coerce:!0})},Qt=ne;var Gt=Object.freeze({__proto__:null,defaultErrorMap:H,setErrorMap:function(e){Y=e},getErrorMap:X,makeIssue:ee,EMPTY_PATH:[],addIssueToContext:te,ParseStatus:se,INVALID:ne,DIRTY:re,OK:ie,isAborted:ae,isDirty:oe,isValid:ce,isAsync:ue,get util(){return q},get objectUtil(){return V},ZodParsedType:W,getParsedType:K,ZodType:me,ZodString:xe,ZodNumber:Oe,ZodBigInt:Se,ZodBoolean:Ce,ZodDate:Ae,ZodSymbol:Te,ZodUndefined:Ze,ZodNull:Re,ZodAny:Fe,ZodUnknown:Ee,ZodNever:Pe,ZodVoid:Le,ZodArray:Ne,ZodObject:Me,ZodUnion:Ue,ZodDiscriminatedUnion:$e,ZodIntersection:ze,ZodTuple:qe,ZodRecord:Ve,ZodMap:Je,ZodSet:We,ZodFunction:Ke,ZodLazy:Qe,ZodLiteral:Ge,ZodEnum:Ye,ZodNativeEnum:Xe,ZodPromise:et,ZodEffects:tt,ZodTransformer:tt,ZodOptional:st,ZodNullable:nt,ZodDefault:rt,ZodCatch:it,ZodNaN:at,BRAND:ot,ZodBranded:ct,ZodPipeline:ut,ZodReadonly:dt,custom:lt,Schema:me,ZodSchema:me,late:pt,get ZodFirstPartyTypeKind(){return ht},coerce:Kt,any:xt,array:Ct,bigint:yt,boolean:vt,date:_t,discriminatedUnion:Rt,effect:zt,enum:Dt,function:It,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>lt((t=>t instanceof e),t),intersection:Ft,lazy:Mt,literal:Ut,map:Lt,nan:gt,nativeEnum:$t,never:Ot,null:kt,nullable:Vt,number:ft,object:At,oboolean:()=>vt().optional(),onumber:()=>ft().optional(),optional:qt,ostring:()=>mt().optional(),pipeline:Wt,preprocess:Jt,promise:Bt,record:Pt,set:Nt,strictObject:Tt,string:mt,symbol:bt,transformer:zt,tuple:Et,undefined:wt,union:Zt,unknown:jt,void:St,NEVER:Qt,ZodIssueCode:Q,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:G});const Ht=Gt.object({create:Gt.boolean(),read:Gt.boolean(),publish:Gt.boolean(),administrate:Gt.boolean(),update:Gt.boolean(),delete:Gt.boolean(),comment:Gt.boolean(),member:Gt.boolean()}),Yt=e=>Ht.safeParse(e).success,Xt=Gt.string(),es=Gt.string().nullable(),ts=Gt.number(),ss=Gt.string().nullable(),ns=Gt.string().nullable(),rs=Gt.string().nullable(),is=Gt.number(),as=Gt.string(),os=Gt.string(),cs=Gt.union([is,rs,ns,ss,as,ts,es,Xt,os]),us={ADMIN:9,USER:5,EXTERNAL:3,GUEST:0},ds=Gt.lazy((()=>Ts.extend({title:Gt.string(),_url:Gt.string(),level:Gt.nativeEnum(us),dateCreation:Gt.string(),dateModified:Gt.string()}).catchall(cs))),ls=Gt.lazy((()=>ds.schema.extend({active:Gt.number()}))),ps=e=>ls.safeParse(e).success,hs=ls,ms=e=>hs.safeParse(e).success,fs=Gt.object({idInType:Gt.number(),lat:Gt.number(),lng:Gt.number()}),gs=e=>fs.safeParse(e).success,ys=Gt.object({title:Gt.string(),firstname:Gt.string(),lastname:Gt.string(),mail:Gt.union([Gt.string(),Gt.undefined()]).optional(),description:Gt.string().optional(),dateOfBirth:Gt.string().optional(),phoneNumber:Gt.string().optional(),language:Gt.string().optional(),timeZone:Gt.string().optional(),mobileNumber:Gt.string().optional(),company:Gt.string().optional(),country:Gt.string().optional(),department:Gt.string().optional(),function:Gt.string().optional(),webSite:Gt.string().optional(),image:Gt.union([Gt.string(),Gt.undefined()]).optional(),userBanner:Gt.union([Gt.string(),Gt.undefined()]).optional(),field1:Gt.string().optional(),field2:Gt.string().optional(),field3:Gt.string().optional(),field4:Gt.string().optional(),field5:Gt.string().optional()}),vs=ys.required().extend({level:Gt.string(),image:Gt.string().optional(),businessManagementManager:ds.array().optional(),businessNetworkingUserToCompanySrc:ds.array().optional()}),_s=Gt.object({user_field_edit_profil:Gt.record(ys.keyof(),Gt.number()),user_field_editable:Gt.record(ys.keyof(),Gt.number()),user_field_my_page:Gt.record(ys.keyof(),Gt.number()),user_page_mandatory_fields:Gt.object({firstname:Gt.enum(["0","1"]),lastname:Gt.enum(["0","1"]),pseudo:Gt.enum(["0","1"])})}),bs=Gt.object({name:Gt.string(),value:Gt.union([Gt.string(),Gt.record(Gt.string(),Gt.any())])}),ws=Gt.enum(["popover"]),ks=Gt.object({values:vs,mobileEditableFields:vs.keyof().array()}),xs=Gt.object({mail:Gt.union([Gt.string(),Gt.undefined()]),title:Gt.string(),firstname:Gt.string(),lastname:Gt.string(),phoneNumber:Gt.union([Gt.string(),Gt.undefined()]).optional(),company:Gt.union([Gt.string(),Gt.undefined()]).optional(),function:Gt.union([Gt.string(),Gt.undefined()]).optional(),uri:Gt.union([Gt.string(),Gt.undefined()]).optional(),field1:Gt.union([Gt.string(),Gt.undefined()]).optional(),field2:Gt.union([Gt.string(),Gt.undefined()]).optional(),field3:Gt.union([Gt.string(),Gt.undefined()]).optional(),field4:Gt.union([Gt.string(),Gt.undefined()]).optional(),field5:Gt.union([Gt.string(),Gt.undefined()]).optional()}),js=Gt.object({userDirectoryShow:Gt.union([Gt.literal(""),Gt.literal("1")]),contactDirectoryShow:Gt.union([Gt.literal("0"),Gt.literal("1")]),businessContactShow:Gt.boolean(),menu:Gt.union([Gt.literal("0"),Gt.literal("1")]),cardFields:Gt.string().array(),tableFields:Gt.string().array(),viewFields:Gt.string().array(),userGeoloc:Gt.boolean().optional(),sort:Gt.string(),cnt:Gt.number().optional(),filters:Gt.object({name:Gt.string(),type:Gt.string()}).array()}),Os=e=>js.safeParse(e).success,Ss=Gt.lazy((()=>Zs.extend({dateCreation:Gt.string(),dateModified:Gt.string(),firstname:Gt.string(),lastname:Gt.string(),active:Gt.number(),mail:Gt.string().optional()}))),Cs=e=>Ss.safeParse(e).success,As=Gt.lazy((()=>Zs.extend({id:Gt.string(),shortUri:Gt.string(),name:Gt.string(),label:Gt.string(),cssClass:Gt.string(),cssColor:Gt.string(),class:Gt.string(),Pseudo:Gt.string(),_values:Gt.record(Gt.string(),Gt.unknown())}))),Ts=Gt.object({id:Gt.number(),mainType:Gt.string(),type:Gt.string(),uri:Gt.string(),dateCreation:Gt.string().optional(),dateModified:Gt.string().optional().nullable()}),Zs=Ts.extend({title:Gt.string(),_url:Gt.string()}),Rs=e=>Zs.safeParse(e).success,Fs=Gt.lazy((()=>Zs.extend({description:Gt.string().optional().nullable(),_user:ds,_right:Ht}))),Es=e=>Fs.safeParse(e).success,Ps=Gt.object({attrName:Gt.string(),token:Gt.string(),file:Gt.instanceof(File).nullable().optional(),url:Gt.string().optional()}),Ls=Gt.object({width:Gt.number(),height:Gt.number()}),Ns=Gt.object({x:Gt.number(),y:Gt.number(),w:Gt.number(),h:Gt.number(),rotation:Gt.number(),killSize:Gt.boolean().optional()}),Is=Zs.extend({dateCreation:Gt.string(),dateModified:Gt.string().nullable(),mimetype:Gt.string(),path:Gt.string().optional(),size:Gt.number()}),Ms=e=>Is.parse(e),Us=Is.extend({_extend:Gt.object({crop:Ns})}),Ds=Gt.object({name:Gt.string(),filename:Gt.string(),dateModified:Gt.string(),mimetype:Gt.string()}),$s=Gt.object({idUser:Gt.string(),dateDownload:Gt.string(),Pseudo:Gt.string(),type:Gt.string()}),Bs=e=>Gt.object({isActive:Gt.boolean()}).and(e),zs=Gt.enum(["drive_microsoft_graph","drive_dropbox","drive_google"]),qs=Bs(Gt.object({drives:Gt.record(zs,Gt.boolean())})),Vs=Bs(Gt.object({label:Gt.string()})),Js=Bs(Gt.object({orderBy:Gt.string(),order:Gt.enum(["ASC","DESC"])})),Ws=Bs(Gt.object({})),Ks=Gt.object({DriveHook:qs,calendarHook:Vs,FileBankHook:Js,spotRssFeed:Ws}).partial(),Qs=e=>Ks.and(Gt.record(Gt.string(),Gt.any())).parse(e),Gs="accept",Hs="deny";function Ys(e){const t=e;return t&&"number"==typeof t.id&&"number"==typeof t.targetId}const Xs={bookmarkLink:Ys},en={isBookmarkLink:function(e){return"targetId"in e&&!!e.targetId},isBookmarkCustom:function(e){const t=e;return void 0!==t.bookmarkLabel||void 0!==t.bookmarkMeta||void 0!==t.bookmarkUrl},isBookmarkRawList:Ys,isTVChannelType:function(e,t){return"tvChannelType"in e&&e.tvChannelType===t},objectIsType:function(e,t){return null!=t&&Xs[e](t)},isStandardApiError:e=>"object"==typeof e&&null!==e&&"error"in e&&"errorMsg"in e&&"messages"in e&&"number"==typeof e.error&&"string"==typeof e.errorMsg&&Array.isArray(e.messages),isAbortApiError:e=>null!==e&&"object"==typeof e&&"error"in e&&"aborted"in e&&-1===e.error&&!0===e.aborted};function tn(e,t){return e&&!e.endsWith(t)?`${e}${t}`:e}function sn(e,t){return e&&e.startsWith(t)?e.split("").slice(t.length).join(""):e}function nn(e){return e.toString().padStart(2,"0")}function rn(e){return"uri"in e&&e.uri?e.uri:`${e.type}/${e.recordId}`}function an(e){return sn(tn(e.from,"/"),"/")||""}function on(e){return e.timestamp?`?_=${e.timestamp}`:""}function cn(e){const t=[];return"timestamp"in e&&e.timestamp&&t.push(`_=${e.timestamp}`),"iconColor"in e&&e.iconColor&&t.push(`color=${e.iconColor}`),t.length?"?"+t.join("&"):""}function un(e,t=2){return"size"in e&&e.size?e.size:"width"in e&&e.width&&"height"in e&&e.height?`${e.width*t}x${e.height*t}`:""}function dn(e){return e.format||"png"}function ln(e){try{return new URL(e)}catch(e){}try{return new URL(window.location.origin+"/"+sn(e,"/"))}catch(e){}}function pn(e,t=2){if("url"in e&&e.url){const t=ln(e.url);if(t)return"timestamp"in e&&e.timestamp&&!t.searchParams.has("_")&&t.searchParams.append("_",e.timestamp.toString()),t.toString()}return`/${an(e)}${un(e,t)}/${rn(e)}.${dn(e)}${cn(e)}`}const hn=["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pdf","application/zip","application/illustrator","application/postscript","application/vnd.ms-opentype","application/x-font-ttf","application/octet-stream","audio/mp3","audio/mpeg","font/ttf","font/otf","image/jpeg","image/jpg","image/png","image/gif","image/vnd.adobe.photoshop","image/svg+xml","text/plain","text/csv","video/mp4","video/webm"],mn=["docx","xlsx","csv","pptx","pdf","zip","ai","mp3","mpeg","ttf","otf","jpg","jpeg","png","gif","psd","svg","txt","mp4","odt","webm"],fn={"application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.oasis.opendocument.text":"odt","application/pdf":"pdf","application/zip":"zip","application/x-zip-compressed":"zip","application/illustrator":"ai","application/postscript":"ai","audio/mp3":"mp3","audio/mpeg":"mpeg","font/ttf":"ttf","font/otf":"otf","image/jpeg":"jpeg","image/jpg":"jpg","image/png":"png","image/gif":"gif","application/x-font-ttf":"ttf","application/vnd.ms-opentype":"otf","image/vnd.adobe.photoshop":"psd","image/svg+xml":"svg","text/plain":"txt","text/csv":"xlsx","video/mp4":"mp4","video/webm":"mp4"},gn=e=>Object.keys(fn).find((t=>fn[t]===e)),yn=e=>{var t;return null!==(t=fn[e])&&void 0!==t?t:void 0};function vn(e){const t=String(e).split(".").pop();return mn.find((e=>e===t))}const _n=e=>{var t;const s=vn(e);return null!==(t=gn(s))&&void 0!==t?t:"application/octet-stream"},bn=e=>e?(new Date(e).getTime()/1e3).toFixed(0):void 0,wn=(e,t="fitx80")=>{const s=Cn(e),n=bn(e.dateModified);switch(s){default:return;case"video":return`/media/${e.id}.mp4?stream=true`+(n?`&_=${n}`:"");case"audio":return`/media/${e.id}.mp3`+(n?`?_=${n}`:"");case"gif":return pn({timestamp:n,size:t,from:"imagecache",uri:e.uri,format:"gif"});case"image":return pn({timestamp:n,size:t,from:"imagecache",uri:e.uri})}},kn=e=>{const t=vn(e);return void 0!==t?jn(gn(t)):"application"},xn=e=>-1!==["image/vnd","image/svg","image/heic"].findIndex((t=>e.startsWith(t)));function jn(e){return e&&e.startsWith("folder/")?"folder":null==e||xn(e)?"application":e.startsWith("image/gif")?"gif":e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":e.startsWith("font/")||e.startsWith("application/x-font-ttf")||e.startsWith("application/vnd.ms-opentype")?"font":e.startsWith("text/")?"text":"application"}const On=(e,t,s="rr")=>"ng"===s?`/ng/file/${e}/${t}`:`/ng/rr/file/${e}/${t}`,Sn=e=>void 0===e.mimetype||"application/octet-stream"===e.mimetype?_n(e.title):e.mimetype,Cn=e=>void 0===e.mimetype||"application/octet-stream"===e.mimetype?kn(e.title):jn(e.mimetype),An=Array.isArray,Tn=Object.keys,Zn=Object.prototype.hasOwnProperty;function Rn(e,t,s){const n=null==s?void 0:s.map((e=>e.split(".")));if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const r=An(e),i=An(t);let a,o,c;if(r&&i){if(o=e.length,o!==t.length)return!1;for(a=o;0!=a--;)if(!Rn(e[a],t[a],s))return!1;return!0}if(r!==i)return!1;const u=e instanceof Date,d=t instanceof Date;if(u!==d)return!1;if(u&&d)return e.getTime()===t.getTime();const l=e instanceof RegExp,p=t instanceof RegExp;if(l!==p)return!1;if(l&&p)return e.toString()===t.toString();const h=Tn(e).filter((e=>!(null==n?void 0:n.some((t=>1===t.length&&t[0]===e)))));if(o=h.length,o!==Tn(t).filter((e=>!(null==n?void 0:n.some((t=>1===t.length&&t[0]===e))))).length)return!1;for(a=o;0!=a--;)if(!Zn.call(t,h[a]))return!1;for(a=o;0!=a--;)if(c=h[a],!("_owner"===c&&e.$$typeof||Rn(e[c],t[c],null==n?void 0:n.filter((e=>e.length>1&&e[0]===c)).map((e=>e.splice(1).join("."))))))return!1;return!0}return e!=e&&t!=t}function Fn(e,t){if(Array.isArray(e))return e.map((e=>Fn(e,t)));if("object"==typeof e&&null!==e){let s={};return Object.keys(e).forEach((n=>{s=Object.assign(Object.assign({},s),{[n]:n&&t.includes(n)?typeof e[n]:Fn(e[n],t)})})),s}return e}function En(e){return e.startsWith("tag_")||"tags"===e}function Pn(e){return Object.fromEntries(Object.entries(e).filter((([e])=>En(e))))}function Ln(e,t,s){return Object.fromEntries(Object.entries(e).filter((([e])=>En(e))).map((([e,n])=>{const r=Array.isArray(n)?n.map((e=>"object"==typeof e&&e&&t in e?e[t]:e)):n;return[e,s?s(r):r]})))}function Nn(e){return Ln(e,"uri")}const In=e=>{var t;let s={};"_errors"in e&&(s._errors=e._errors),"_options"in e&&(s._options=e._options),"title"in e&&(s.title=e.title),"description"in e&&(s.description=e.description),"activity"in e&&(s.activity=e.activity),"image"in e&&(s.image=e.image),"uri"in e&&(s.uri=e.uri),"type"in e&&(s.type=e.type),"edito"in e&&(s.edito=e.edito),"category"in e&&(s.category=e.category.toString()),"commentLevel"in e&&(s.commentLevel=e.commentLevel),"_options"in e&&(null===(t=e._options)||void 0===t?void 0:t.custom_widgets)&&(s.custom_widgets=Array.isArray(e._options.custom_widgets)?{}:e._options.custom_widgets),"displayType"in e&&(s.displayType=e.displayType),"language"in e&&(s.language=e.language),"edit_access"in e&&(s.edit_access=e.edit_access),"lock_mail"in e&&(s.lock_mail=e.lock_mail),"fileSyncEnabled"in e&&(s.fileSyncEnabled=e.fileSyncEnabled),"fileSyncVersioningType"in e&&(s.fileSyncVersioningType=e.fileSyncVersioningType),"fileBankQuota"in e&&(s.fileBankQuota=e.fileBankQuota),"idCommunity"in e&&(s.idCommunity=e.idCommunity),"lastRssExecution"in e&&(s.lastRssExecution=e.lastRssExecution),"mail_comment"in e&&(s.mail_comment=e.mail_comment),"mail_frequency"in e&&(s.mail_frequency=e.mail_frequency),"mail_spotit"in e&&(s.mail_spotit=e.mail_spotit),"mail_subscriber"in e&&(s.mail_subscriber=e.mail_subscriber),"notifyFolder"in e&&(s.notifyFolder=e.notifyFolder),"nounsubscribe"in e&&(s.nounsubscribe=e.nounsubscribe),"privacy"in e&&(s.privacy=e.privacy),"publishFolder"in e&&(s.publishFolder=e.publishFolder),"rss_access"in e&&(s.rss_access=e.rss_access),"rss_feed"in e&&(s.rss_feed=e.rss_feed&&Array.isArray(e.rss_feed)?JSON.stringify(e.rss_feed.map((e=>{var{_user:t}=e,s=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["_user"]);return Object.assign(Object.assign({},s),{idUser:null==t?void 0:t.id})}))):"[]"),"rss_key"in e&&(s.rss_key=e.rss_key),"spot_right_user"in e&&(s.spot_right_user=e.spot_right_user),"spotBanner"in e&&(s.spotBanner=e.spotBanner),"spotDefaultPublishType"in e&&(s.spotDefaultPublishType=e.spotDefaultPublishType),"user_level_signup"in e&&(s.user_level_signup=e.user_level_signup),"useTeaser"in e&&(s.useTeaser=e.useTeaser),"widgets"in e&&(s.widgets=e.widgets);const n=Pn(e);if(s=Object.assign(Object.assign({},s),n),Mn(e,s))return s;throw new Error},Mn=(e,t)=>{const s=["id","mainType","dateCreation","dateModified","_url","o2apLinksSources"],n=["custom_widgets"],r=Object.keys(e),i=Object.keys(t),a=r.filter((e=>!i.includes(e)&&!s.includes(e))),o=i.filter((e=>!r.includes(e)&&!n.includes(e))),c=[...a.map((e=>"- "+e)),...o.map((e=>"+ "+e))];if(a.length>0||o.length>0)throw new Error(`prepareGroupForUpdate :: Wrong group mapping | Diff : ${JSON.stringify(c)}`);return!0},Un=new z(new J),Dn=new $(Un);window.JamespotUserApi=Dn;const $n=Dn,Bn=$;module.exports=s})();
|
|
1
|
+
(()=>{"use strict";var e,t={d:(e,s)=>{for(var n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},s={};t.r(s),t.d(s,{ACCESS_REQUEST_ACCEPT:()=>en,ACCESS_REQUEST_DENY:()=>tn,AdminLicenseApi:()=>r,AdminStoreApi:()=>i,AdminUtilsApi:()=>a,GroupModerateStatus:()=>Ct,JApplicationApi:()=>o,JArticleApi:()=>c,JAssetReservation:()=>d,JAudienceApi:()=>l,JBaseApi:()=>n,JBookmarkApi:()=>p,JBusinessNetworkingApi:()=>h,JCommunityApi:()=>m,JDiapazoneApi:()=>f,JFaqApi:()=>v,JFileApi:()=>y,JFilebankApi:()=>_,JGlobalApi:()=>b,JGroupApi:()=>x,JIAApi:()=>Kt,JLandApi:()=>Pt,JMessengerApi:()=>Nt,JObjectApi:()=>Vt,JSearchApi:()=>Lt,JShareApi:()=>Bt,JSocialActionApi:()=>Wt,JTaxonomyApi:()=>Mt,JUserApi:()=>Ut,JWedocApi:()=>Dt,JWidgetApi:()=>Gt,JamespotUserApi:()=>Qt,JamespotUserApiInstance:()=>zn,Network:()=>Yt,StudioApplicationStatus:()=>e,TVDisplayApi:()=>$t,UserLevel:()=>ps,WindowBrowser:()=>Xt,api:()=>Jn,businessContactSchema:()=>Ss,deepEqual:()=>Nn,default:()=>Vn,extensions:()=>vn,extractTaxonomiesFromObject:()=>Mn,extractTaxonomiesFromObjectAndMapProperty:()=>Un,extractTaxonomiesFromObjectAndMapUri:()=>Dn,fileCropConfigSchema:()=>Us,formatImgUrl:()=>gn,getArgs:()=>pn,getExtensionFromName:()=>kn,getFileExtensionFromMimetype:()=>wn,getFileFamily:()=>An,getFileFamilyFromName:()=>Sn,getFormat:()=>mn,getFrom:()=>dn,getMimetypeFromExtension:()=>bn,getMimetypeFromName:()=>xn,getSize:()=>hn,getTimestamp:()=>ln,getUri:()=>un,getUrl:()=>fn,imageSizeSchema:()=>Ms,jEnsure:()=>rn,jFileLittleCropSchema:()=>Bs,jFileLittleSchema:()=>Ds,jFileRenditionSchema:()=>qs,jObjectBaseSchema:()=>Zs,jObjectListSchema:()=>Ns,jObjectLittleSchema:()=>Es,jUserListSchema:()=>ms,jUserLittleSchema:()=>hs,jUserValuesSchema:()=>ws,jUserViewSchema:()=>gs,mimetypeToExt:()=>_n,mimetypes:()=>yn,network:()=>qn,objectTimestamp:()=>jn,padStartTwoDigits:()=>cn,prepareGroupForUpdate:()=>$n,removeIfStartsWith:()=>on,replacePropertiesWithTypes:()=>Ln,resolveFileFamily:()=>Fn,resolveFileMimetype:()=>Rn,resolveFilePath:()=>On,resolveFileUrl:()=>Tn,rightsSchema:()=>es,suffixIfDoesNotExist:()=>an,uploadConfigSchema:()=>Is,userDefaultFieldsTypeSchema:()=>bs,userDirectoryConfigurationSchema:()=>Cs,userDownloadSchema:()=>zs,userFieldSchema:()=>xs,userFieldsConfigurationTypeSchema:()=>ks,userFieldsSchema:()=>js,userMapModelSchema:()=>vs,userModelSchema:()=>Ts,userSchema:()=>Fs,userValuesSchema:()=>Os,userlevelSpotShema:()=>Tt,validateIsFormatFileLittle:()=>$s,validateIsFormatHookListType:()=>Xs,validateIsFormatObjectList:()=>Ls,validateIsFormatObjectLittle:()=>Ps,validateIsFormatRights:()=>ts,validateIsFormatUserDirectoryConfiguration:()=>As,validateIsFormatUserLevelSpot:()=>Rt,validateIsFormatUserList:()=>fs,validateIsFormatUserMapModel:()=>_s,validateIsFormatUserModel:()=>Rs,validateIsFormatUserView:()=>ys,widgetActiveValueSchema:()=>cs,widgetDatePickerValueSchema:()=>os,widgetDateValueSchema:()=>is,widgetDatetimeValueSchema:()=>as,widgetEmailValueSchema:()=>us,widgetNumberValueSchema:()=>rs,widgetTextValueSchema:()=>ss,widgetTextareaValueSchema:()=>ns,widgetUrlValueSchema:()=>ds,widgetsValueSchema:()=>ls});class n{constructor(e){this.jApi=e,this.network=e.network}}class r extends n{getLicenseUserStatistics(){return this.network.post({o:"licenseManager",f:"userStatistics"})}assignLicense(e){return this.network.postCSRF({o:"licenseManager",f:"assignLicense",uri:e})}unAssignLicense(e){return this.network.postCSRF({o:"licenseManager",f:"unassignLicense",uri:e})}getAssignmentMode(e){return this.network.post({o:"licenseManager",f:"getAssignmentMode",type:e})}setAssignmentMode(e,t){return this.network.postCSRF({o:"licenseManager",f:"setAssignmentMode",value:t,type:e})}assignPossiblesLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"assignPossiblesLicenses",type:e})}unAssignUnusedLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"unassignUnusedLicenses",type:e})}optimizeLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"optimizeLicenses",type:e})}getObjectsWithoutLicense(e,t){return this.network.post({o:"licenseManager",f:"countObjectsWithoutLicense",type:e,filter:t})}getLicensesNotAssigned(e){return this.network.post({o:"licenseManager",f:"countLicensesNotAssigned",type:e})}getLicensesAssigned(e){return this.network.post({o:"licenseManager",f:"getLicensesAssigned",type:e})}}class i extends n{getItem(e){return this.network.post({o:"adminStore",f:"getItem",uri:e})}checkoutBilling(e){return this.network.postCSRF({o:"adminStore",f:"checkoutBilling",uri:e})}checkoutFinalize(e){return this.network.postCSRF({o:"adminStore",f:"checkoutFinalize",uri:e})}}class a extends n{getApps(){return this.network.post({o:"admin",f:"apps"})}}!function(e){e.local="local",e.installed="installed",e.autosaved="autosaved",e.saved="saved"}(e||(e={}));class o extends n{list(){return this.network.post({o:"studio",f:"list"})}get(e,t){return this.network.post({o:"studio",f:"get",idApp:e,status:t})}install(e){return this.network.postCSRF({o:"studio",f:"install",value:e})}suspend(e){return this.network.postCSRF({o:"studio",f:"suspend",idApp:e})}restart(e){return this.network.postCSRF({o:"studio",f:"restart",idApp:e})}save(t,s,n){if(n===e.saved||n===e.autosaved)return this.network.postCSRF({o:"studio",f:"save",idApp:t,value:s,status:n});throw"Invalid status value"}delete(e,t){return s=this,n=void 0,i=function*(){return this.network.postCSRF({o:"studio",f:"delete",idApp:e,status:t}).then((e=>{if(0===e.error)return e.messages;throw e.messages}))},new((r=void 0)||(r=Promise))((function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function o(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var s;t.done?e(t.value):(s=t.value,s instanceof r?s:new r((function(e){e(s)}))).then(a,o)}c((i=i.apply(s,n||[])).next())}));var s,n,r,i}cssClassList(){return this.network.post({o:"studio",f:"icons"})}}class c extends n{list(e){return this.network.post(Object.assign({o:"objectList",f:"jamespotArticleQueryList"},e))}get(e){return this.network.post(Object.assign({o:"article",f:"get"},e))}create(e,t){return this.network.maybePostToken(Object.assign({o:"article",f:"create",format:null!=t?t:"raw-list"},e))}update(e){return this.network.post(Object.assign(Object.assign({format:"raw-list"},e),{o:"article",f:"update"}))}delete(e){return this.network.postCSRF({o:"article",f:"delete",idArticle:e})}count(e){return this.network.post({o:"article",f:"count",type:e})}getAttachments(e,t,s){return this.network.post({o:"article",f:"getAttachment",idArticle:e,type:t,format:s})}permalink(e){return this.network.post({o:"article",f:"permalink",permalinkId:e})}saveAsDraft(e,t,s){return this.network.post({o:"article",f:"saveAsDraft",form:e,contentType:t,idDraft:s})}getComments(e,t){var s,n;return this.network.post(Object.assign(Object.assign({o:"article",f:"getComments"},e),{attachments:null!==(s=e.attachment)&&void 0!==s&&s,limits:null!==(n=e.limits)&&void 0!==n?n:{start:0,max:1e4},format:null!=t?t:"raw-little"}))}addComment(e,t){return this.network.post(Object.assign(Object.assign({o:"article",f:"addComment"},e),{alertAuthor:Number(e.alertAuthor),sendAlert:Number(e.sendAlert),type:"comment",format:null!=t?t:"raw-little"}))}updateComment(e,t){return this.network.post(Object.assign(Object.assign({o:"article",f:"updateComment"},e),{format:null!=t?t:"raw-little"}))}deleteComment(e){return this.network.postCSRF({o:"comment",f:"delete",idComment:e})}getRead(e){return this.network.post({o:"article",f:"getRead",uri:e})}}var u=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s};class d extends n{configuration(){return this.network.post({o:"assetReservation",f:"configuration"})}createReservation(e){return this.network.postCSRF(Object.assign({o:"assetReservation",f:"createReservation",format:"raw-list"},e))}getReservations(e){var{format:t="raw-list"}=e,s=u(e,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"getReservations",format:t},s))}cancelReservation(e){return this.network.post({o:"assetReservation",f:"cancelReservation",format:"raw-list",idArticle:e})}bookByDate(e){var{format:t="raw-list"}=e,s=u(e,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"BookByDate",format:t},s))}getList(e){var{format:t="raw-list"}=e,s=u(e,["format"]);return this.network.post(Object.assign({o:"objectList",f:"assetReservationList",format:t},s))}}class l extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"audience",q:e}).then((e=>{if(Array.isArray(e.result))return e.result;throw"Bad response from backend"}))}}class p extends n{getFormattedList(e,t){return this.network.post(Object.assign({o:"objectList",f:"bookmarksList",format:t},e))}addFormattedLink(e,t,s){const n=null!=s?s:"list";return this.network.post({o:"custom",f:"actionAdd",type:"bookmarkLink",targetId:e,targetType:t,format:n})}addBookmark(e,t){return this.network.postCSRF(Object.assign({o:"bookmarks",f:"add"},e))}delete(e){return this.network.postCSRF({o:"bookmarks",f:"delete",bookmarkID:e})}rename(e,t,s){return this.network.postCSRF({o:"bookmarks",f:"rename",bookmarkID:e,bookmarkLabel:t,bookmarkUrl:s})}move(e,t,s){return this.network.postCSRF({o:"bookmarks",f:"move",bookmarkID:e,bookmarkReference:t,bookmarkPosition:s})}}class h extends n{getInfos(e,t){return this.network.post({o:"BusinessNetworking",f:"MarkerInfo",id:e,format:null!=t?t:"raw-little"})}}class m extends n{get(e,t){return this.network.post({o:"community",f:"getCommunity",idCommunity:e,format:t||"raw-little"})}sendRequest(e,t){return this.network.post({o:"community",f:"sendRequest",message:e,idUserTo:t})}autocomplete(e){return this.network.post({o:"autocomplete",f:"community",q:e}).then((e=>e.result))}}class f extends n{create(e,t,s,n,r){return this.network.post({o:"article",f:"create",type:e,token:t,title:s,dateStart:n,publishTo:r})}getList(e="",t=[],s=[],n=1,r="raw-list"){return this.network.post({o:"objectList",f:"diapazoneQueryList",query:e,filters:t,orders:s,page:n,format:r})}}var g=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class y extends n{upload(e){const t=new FormData;return t.append("attrName",e.attrName),e.file?t.append(e.attrName,e.file):e.url&&t.append("url",e.url),t.append("token",e.token),this.network.postFile(t)}uploadMany(e){return g(this,void 0,void 0,(function*(){return Promise.all(e.map((e=>this.upload(e))))}))}get(e,t){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"get",idFile:e,format:t})}))}getParent(e,t){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getParent",idFile:e,format:t})}))}getWithHash(e,t,s){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getWithHash",idFile:e,hash:t,format:s})}))}duplicate(e,t,s){return g(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"duplicateFile",idFile:e,title:t,publishTo:s})}))}updateFile(e,t){return g(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"updateFile",idFile:e,title:t})}))}update(e,t,s){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"update",idFile:e,type:t,cropDatas:Object.assign(Object.assign({},s),{rotateBeforeCrop:!0}),killSize:s.killSize,format:"raw-little"})}))}deleteFile(e,t,s,n){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"delete",idFile:e,attrName:t,token:s},n)}))}deleteImage(e,t){return g(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"deleteImage",id:e,type:t})}))}getDownload(e){return this.network.post({o:"file",f:"getDownload",id:e})}generatePreview(e){return this.network.post({o:"file",f:"generatePreview",id:e})}}class v extends n{getCategoriesList(e,t){return this.network.post({o:"objectList",f:"faqQueryList",format:null!=e?e:"raw-list",orders:null!=t?t:[{name:"dateCreation",sort:"ASC"}]})}createCategory(e,t){return this.jApi.article.create(Object.assign(Object.assign({},e),{type:"faq"}),null!=t?t:"raw-view")}updateCategory(e,t){return this.jApi.article.update(Object.assign(Object.assign({},e),{type:"faq",format:null!=t?t:"raw-view"}))}getCategory(e,t){return this.jApi.article.get({idArticle:e,format:null!=t?t:"raw-view"})}deleteCategory(e){return this.jApi.article.delete(e)}checkItem(e,t,s){return this.network.post({o:"faq",f:"checkItem",query:e,page:null!=t?t:1,format:null!=s?s:"raw-list"})}getTaxonomy(){return this.network.post({o:"faq",f:"getFaqTaxonomy"})}getHookProperties(e){return this.network.post({o:"faq",f:"getHookProperties",properties:null!=e?e:["_web"]})}getAccess(){return this.network.post({o:"faq",f:"access"})}createTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-theme"},e),{format:null!=t?t:"raw-view"}))}deleteTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"delete-theme"},e),{format:null!=t?t:"raw-view"}))}updateTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"set-theme"},e),{format:null!=t?t:"raw-view"}))}getEntry(e,t){return this.network.post({o:"faq",f:"get-entry",uri:e,format:null!=t?t:"raw-view"})}deleteEntry(e){return this.jApi.article.delete(e)}createEntry(e,t){return this.jApi.article.create(Object.assign(Object.assign({},e),{idSpot:["content"],type:"faqItem"}),null!=t?t:"raw-view")}addEntry(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-entry"},e),{format:null!=t?t:"raw-view"}))}updateEntry(e,t){return this.jApi.article.update(Object.assign(Object.assign({},e),{type:"faqItem",format:null!=t?t:"raw-view"}))}moveEntry(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-entry"},e),{format:null!=t?t:"raw-view"}))}moveTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-theme"},e),{format:null!=t?t:"raw-view"}))}}class _ extends n{getBanks(e="list"){return this.network.post({o:"fileBank",f:"getBanks",format:e}).then((e=>e.result))}getFolders(e){return this.network.post({o:"fileBank",f:"getFolders",parentURI:e})}getDocuments(e){return this.network.post({o:"fileBank",f:"getDocuments",parentURI:e})}}class b extends n{countAction(e,t){return this.network.post({o:"activityLog",f:"log",count:!0,verb:e,uri:t})}}var w,k;class x extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"spot",q:e,idToUri:!1}).then((e=>e.result))}create(e,t){return this.network.post(Object.assign(Object.assign({o:"spot",f:"create"},e),{format:t}))}update(e,t){const{spotBanner:s}=e,n=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["spotBanner"]);return this.network.postCSRF(Object.assign(Object.assign({o:"spot",f:"update"},n),{format:t}))}getSpot(e,t){return this.network.post({o:"spot",f:"getSpot",idSpot:e,format:t})}getProperties(e){return this.network.post({o:"spot",f:"getProperties",idSpot:e})}getApplications(){return this.network.post({o:"spot",f:"get-available-widget"})}getCategories(){return this.network.post({o:"spot",f:"get-categories"})}getObjectListJamespotSpotMembers(e,t,s,n=1){return this.network.post({o:"objectListJamespot",f:"SpotMembers",idSpot:e,limit:s,page:n,format:"raw-little",query:t})}list(e){return this.network.post(Object.assign({o:"objectList",f:"jamespotSpotQueryList"},e))}resetNotifications(e){return this.network.post(Object.assign({o:"spot",f:"resetNotifications"},e))}getUserLevelAndRight(e){return this.network.post({o:"spot",f:"getUserLevelAndRight",idSpot:e})}groupRequest(e){return this.network.postCSRF({o:"spot",f:"request",idSpot:e})}groupAddToFavorite(e){return this.network.postCSRF({o:"spot",f:"addToFavorite",idSpot:e})}}!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const s of e)t[s]=s;return t},e.getValidEnumValues=t=>{const s=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of s)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(s);return t},e.find=(e,t)=>{for(const s of e)if(t(s))return s},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(w||(w={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(k||(k={}));const j=w.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),O=e=>{switch(typeof e){case"undefined":return j.undefined;case"string":return j.string;case"number":return isNaN(e)?j.nan:j.number;case"boolean":return j.boolean;case"function":return j.function;case"bigint":return j.bigint;case"symbol":return j.symbol;case"object":return Array.isArray(e)?j.array:null===e?j.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?j.promise:"undefined"!=typeof Map&&e instanceof Map?j.map:"undefined"!=typeof Set&&e instanceof Set?j.set:"undefined"!=typeof Date&&e instanceof Date?j.date:j.object;default:return j.unknown}},S=w.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class C extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},s={_errors:[]},n=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(n);else if("invalid_return_type"===r.code)n(r.returnTypeError);else if("invalid_arguments"===r.code)n(r.argumentsError);else if(0===r.path.length)s._errors.push(t(r));else{let e=s,n=0;for(;n<r.path.length;){const s=r.path[n];n===r.path.length-1?(e[s]=e[s]||{_errors:[]},e[s]._errors.push(t(r))):e[s]=e[s]||{_errors:[]},e=e[s],n++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,w.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}C.create=e=>new C(e);const A=(e,t)=>{let s;switch(e.code){case S.invalid_type:s=e.received===j.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case S.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,w.jsonStringifyReplacer)}`;break;case S.unrecognized_keys:s=`Unrecognized key(s) in object: ${w.joinValues(e.keys,", ")}`;break;case S.invalid_union:s="Invalid input";break;case S.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${w.joinValues(e.options)}`;break;case S.invalid_enum_value:s=`Invalid enum value. Expected ${w.joinValues(e.options)}, received '${e.received}'`;break;case S.invalid_arguments:s="Invalid function arguments";break;case S.invalid_return_type:s="Invalid function return type";break;case S.invalid_date:s="Invalid date";break;case S.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:w.assertNever(e.validation):s="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case S.too_small:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case S.too_big:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case S.custom:s="Invalid input";break;case S.invalid_intersection_types:s="Intersection results could not be merged";break;case S.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case S.not_finite:s="Number must be finite";break;default:s=t.defaultError,w.assertNever(e)}return{message:s}};let T=A;function R(){return T}const F=e=>{const{data:t,path:s,errorMaps:n,issueData:r}=e,i=[...s,...r.path||[]],a={...r,path:i};let o="";const c=n.filter((e=>!!e)).slice().reverse();for(const e of c)o=e(a,{data:t,defaultError:o}).message;return{...r,path:i,message:r.message||o}};function Z(e,t){const s=F({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,R(),A].filter((e=>!!e))});e.common.issues.push(s)}class E{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if("aborted"===n.status)return P;"dirty"===n.status&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const e of t)s.push({key:await e.key,value:await e.value});return E.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:t,value:r}=n;if("aborted"===t.status)return P;if("aborted"===r.status)return P;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!n.alwaysSet||(s[t.value]=r.value)}return{status:e.value,value:s}}}const P=Object.freeze({status:"aborted"}),N=e=>({status:"dirty",value:e}),L=e=>({status:"valid",value:e}),I=e=>"aborted"===e.status,M=e=>"dirty"===e.status,U=e=>"valid"===e.status,D=e=>"undefined"!=typeof Promise&&e instanceof Promise;var $;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}($||($={}));class B{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const q=(e,t)=>{if(U(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new C(e.common.issues);return this._error=t,this._error}}};function z(e){if(!e)return{};const{errorMap:t,invalid_type_error:s,required_error:n,description:r}=e;if(t&&(s||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:r}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=s?s:t.defaultError},description:r}}class V{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return O(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:O(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new E,ctx:{common:e.parent.common,data:e.data,parsedType:O(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(D(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:null!==(s=null==t?void 0:t.async)&&void 0!==s&&s,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)},r=this._parseSync({data:e,path:n.path,parent:n});return q(n,r)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)},n=this._parse({data:e,path:s.path,parent:s}),r=await(D(n)?n:Promise.resolve(n));return q(s,r)}refine(e,t){const s=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const r=e(t),i=()=>n.addIssue({code:S.custom,...s(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(i(),!1))):!!r||(i(),!1)}))}refinement(e,t){return this._refinement(((s,n)=>!!e(s)||(n.addIssue("function"==typeof t?t(s,n):t),!1)))}_refinement(e){return new Ze({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ee.create(this,this._def)}nullable(){return Pe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return he.create(this,this._def)}promise(){return Fe.create(this,this._def)}or(e){return ge.create([this,e],this._def)}and(e){return be.create(this,e,this._def)}transform(e){return new Ze({...z(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ne({...z(this._def),innerType:this,defaultValue:t,typeName:ze.ZodDefault})}brand(){return new Ue({typeName:ze.ZodBranded,type:this,...z(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Le({...z(this._def),innerType:this,catchValue:t,typeName:ze.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return De.create(this,e)}readonly(){return $e.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const J=/^c[^\s-]{8,}$/i,W=/^[a-z][a-z0-9]*$/,K=/^[0-9A-HJKMNP-TV-Z]{26}$/,G=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Q=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let H;const Y=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,X=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class ee extends V{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==j.string){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.string,received:t.parsedType}),P}const t=new E;let s;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),Z(s,{code:S.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),Z(s,{code:S.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const n=e.data.length>a.value,r=e.data.length<a.value;(n||r)&&(s=this._getOrReturnCtx(e,s),n?Z(s,{code:S.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&Z(s,{code:S.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)Q.test(e.data)||(s=this._getOrReturnCtx(e,s),Z(s,{validation:"email",code:S.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)H||(H=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),H.test(e.data)||(s=this._getOrReturnCtx(e,s),Z(s,{validation:"emoji",code:S.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)G.test(e.data)||(s=this._getOrReturnCtx(e,s),Z(s,{validation:"uuid",code:S.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)J.test(e.data)||(s=this._getOrReturnCtx(e,s),Z(s,{validation:"cuid",code:S.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)W.test(e.data)||(s=this._getOrReturnCtx(e,s),Z(s,{validation:"cuid2",code:S.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)K.test(e.data)||(s=this._getOrReturnCtx(e,s),Z(s,{validation:"ulid",code:S.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch(n){s=this._getOrReturnCtx(e,s),Z(s,{validation:"url",code:S.invalid_string,message:a.message}),t.dirty()}else"regex"===a.kind?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),Z(s,{validation:"regex",code:S.invalid_string,message:a.message}),t.dirty())):"trim"===a.kind?e.data=e.data.trim():"includes"===a.kind?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),Z(s,{code:S.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty()):"toLowerCase"===a.kind?e.data=e.data.toLowerCase():"toUpperCase"===a.kind?e.data=e.data.toUpperCase():"startsWith"===a.kind?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),Z(s,{code:S.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty()):"endsWith"===a.kind?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),Z(s,{code:S.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty()):"datetime"===a.kind?((i=a).precision?i.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`):0===i.precision?i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(s=this._getOrReturnCtx(e,s),Z(s,{code:S.invalid_string,validation:"datetime",message:a.message}),t.dirty()):"ip"===a.kind?(n=e.data,("v4"!==(r=a.version)&&r||!Y.test(n))&&("v6"!==r&&r||!X.test(n))&&(s=this._getOrReturnCtx(e,s),Z(s,{validation:"ip",code:S.invalid_string,message:a.message}),t.dirty())):w.assertNever(a);var n,r,i;return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement((t=>e.test(t)),{validation:t,code:S.invalid_string,...$.errToObj(s)})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...$.errToObj(e)})}url(e){return this._addCheck({kind:"url",...$.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...$.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...$.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...$.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...$.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...$.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...$.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...$.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...$.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...$.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...$.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...$.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...$.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...$.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...$.errToObj(t)})}nonempty(e){return this.min(1,$.errToObj(e))}trim(){return new ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function te(e,t){const s=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=s>n?s:n;return parseInt(e.toFixed(r).replace(".",""))%parseInt(t.toFixed(r).replace(".",""))/Math.pow(10,r)}ee.create=e=>{var t;return new ee({checks:[],typeName:ze.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...z(e)})};class se extends V{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==j.number){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.number,received:t.parsedType}),P}let t;const s=new E;for(const n of this._def.checks)"int"===n.kind?w.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Z(t,{code:S.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),Z(t,{code:S.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),Z(t,{code:S.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):"multipleOf"===n.kind?0!==te(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),Z(t,{code:S.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Z(t,{code:S.not_finite,message:n.message}),s.dirty()):w.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,s,n){return new se({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:$.toString(n)}]})}_addCheck(e){return new se({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:$.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:$.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&w.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}se.create=e=>new se({checks:[],typeName:ze.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...z(e)});class ne extends V{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==j.bigint){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.bigint,received:t.parsedType}),P}let t;const s=new E;for(const n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),Z(t,{code:S.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),Z(t,{code:S.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Z(t,{code:S.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):w.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,s,n){return new ne({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:$.toString(n)}]})}_addCheck(e){return new ne({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ne.create=e=>{var t;return new ne({checks:[],typeName:ze.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...z(e)})};class re extends V{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==j.boolean){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.boolean,received:t.parsedType}),P}return L(e.data)}}re.create=e=>new re({typeName:ze.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...z(e)});class ie extends V{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==j.date){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.date,received:t.parsedType}),P}if(isNaN(e.data.getTime()))return Z(this._getOrReturnCtx(e),{code:S.invalid_date}),P;const t=new E;let s;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),Z(s,{code:S.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),Z(s,{code:S.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):w.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ie({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:$.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:$.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ie.create=e=>new ie({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ze.ZodDate,...z(e)});class ae extends V{_parse(e){if(this._getType(e)!==j.symbol){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.symbol,received:t.parsedType}),P}return L(e.data)}}ae.create=e=>new ae({typeName:ze.ZodSymbol,...z(e)});class oe extends V{_parse(e){if(this._getType(e)!==j.undefined){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.undefined,received:t.parsedType}),P}return L(e.data)}}oe.create=e=>new oe({typeName:ze.ZodUndefined,...z(e)});class ce extends V{_parse(e){if(this._getType(e)!==j.null){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.null,received:t.parsedType}),P}return L(e.data)}}ce.create=e=>new ce({typeName:ze.ZodNull,...z(e)});class ue extends V{constructor(){super(...arguments),this._any=!0}_parse(e){return L(e.data)}}ue.create=e=>new ue({typeName:ze.ZodAny,...z(e)});class de extends V{constructor(){super(...arguments),this._unknown=!0}_parse(e){return L(e.data)}}de.create=e=>new de({typeName:ze.ZodUnknown,...z(e)});class le extends V{_parse(e){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.never,received:t.parsedType}),P}}le.create=e=>new le({typeName:ze.ZodNever,...z(e)});class pe extends V{_parse(e){if(this._getType(e)!==j.undefined){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.void,received:t.parsedType}),P}return L(e.data)}}pe.create=e=>new pe({typeName:ze.ZodVoid,...z(e)});class he extends V{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==j.array)return Z(t,{code:S.invalid_type,expected:j.array,received:t.parsedType}),P;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,r=t.data.length<n.exactLength.value;(e||r)&&(Z(t,{code:e?S.too_big:S.too_small,minimum:r?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(Z(t,{code:S.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(Z(t,{code:S.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map(((e,s)=>n.type._parseAsync(new B(t,e,t.path,s))))).then((e=>E.mergeArray(s,e)));const r=[...t.data].map(((e,s)=>n.type._parseSync(new B(t,e,t.path,s))));return E.mergeArray(s,r)}get element(){return this._def.type}min(e,t){return new he({...this._def,minLength:{value:e,message:$.toString(t)}})}max(e,t){return new he({...this._def,maxLength:{value:e,message:$.toString(t)}})}length(e,t){return new he({...this._def,exactLength:{value:e,message:$.toString(t)}})}nonempty(e){return this.min(1,e)}}function me(e){if(e instanceof fe){const t={};for(const s in e.shape){const n=e.shape[s];t[s]=Ee.create(me(n))}return new fe({...e._def,shape:()=>t})}return e instanceof he?new he({...e._def,type:me(e.element)}):e instanceof Ee?Ee.create(me(e.unwrap())):e instanceof Pe?Pe.create(me(e.unwrap())):e instanceof we?we.create(e.items.map((e=>me(e)))):e}he.create=(e,t)=>new he({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...z(t)});class fe extends V{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=w.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==j.object){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.object,received:t.parsedType}),P}const{status:t,ctx:s}=this._processInputParams(e),{shape:n,keys:r}=this._getCached(),i=[];if(!(this._def.catchall instanceof le&&"strip"===this._def.unknownKeys))for(const e in s.data)r.includes(e)||i.push(e);const a=[];for(const e of r){const t=n[e],r=s.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new B(s,r,s.path,e)),alwaysSet:e in s.data})}if(this._def.catchall instanceof le){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)a.push({key:{status:"valid",value:e},value:{status:"valid",value:s.data[e]}});else if("strict"===e)i.length>0&&(Z(s,{code:S.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const n=s.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new B(s,n,s.path,t)),alwaysSet:t in s.data})}}return s.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of a){const s=await t.key;e.push({key:s,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>E.mergeObjectSync(t,e))):E.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return $.errToObj,new fe({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,s)=>{var n,r,i,a;const o=null!==(i=null===(r=(n=this._def).errorMap)||void 0===r?void 0:r.call(n,t,s).message)&&void 0!==i?i:s.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=$.errToObj(e).message)&&void 0!==a?a:o}:{message:o}}}:{}})}strip(){return new fe({...this._def,unknownKeys:"strip"})}passthrough(){return new fe({...this._def,unknownKeys:"passthrough"})}extend(e){return new fe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new fe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ze.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new fe({...this._def,catchall:e})}pick(e){const t={};return w.objectKeys(e).forEach((s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])})),new fe({...this._def,shape:()=>t})}omit(e){const t={};return w.objectKeys(this.shape).forEach((s=>{e[s]||(t[s]=this.shape[s])})),new fe({...this._def,shape:()=>t})}deepPartial(){return me(this)}partial(e){const t={};return w.objectKeys(this.shape).forEach((s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()})),new fe({...this._def,shape:()=>t})}required(e){const t={};return w.objectKeys(this.shape).forEach((s=>{if(e&&!e[s])t[s]=this.shape[s];else{let e=this.shape[s];for(;e instanceof Ee;)e=e._def.innerType;t[s]=e}})),new fe({...this._def,shape:()=>t})}keyof(){return Ae(w.objectKeys(this.shape))}}fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:le.create(),typeName:ze.ZodObject,...z(t)}),fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:le.create(),typeName:ze.ZodObject,...z(t)}),fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:le.create(),typeName:ze.ZodObject,...z(t)});class ge extends V{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;if(t.common.async)return Promise.all(s.map((async e=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const s of e)if("dirty"===s.result.status)return t.common.issues.push(...s.ctx.common.issues),s.result;const s=e.map((e=>new C(e.ctx.common.issues)));return Z(t,{code:S.invalid_union,unionErrors:s}),P}));{let e;const n=[];for(const r of s){const s={...t,common:{...t.common,issues:[]},parent:null},i=r._parseSync({data:t.data,path:t.path,parent:s});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:s}),s.common.issues.length&&n.push(s.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=n.map((e=>new C(e)));return Z(t,{code:S.invalid_union,unionErrors:r}),P}}get options(){return this._def.options}}ge.create=(e,t)=>new ge({options:e,typeName:ze.ZodUnion,...z(t)});const ye=e=>e instanceof Se?ye(e.schema):e instanceof Ze?ye(e.innerType()):e instanceof Ce?[e.value]:e instanceof Te?e.options:e instanceof Re?Object.keys(e.enum):e instanceof Ne?ye(e._def.innerType):e instanceof oe?[void 0]:e instanceof ce?[null]:null;class ve extends V{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==j.object)return Z(t,{code:S.invalid_type,expected:j.object,received:t.parsedType}),P;const s=this.discriminator,n=t.data[s],r=this.optionsMap.get(n);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(Z(t,{code:S.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),P)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const s of t){const t=ye(s.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,s)}}return new ve({typeName:ze.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...z(s)})}}function _e(e,t){const s=O(e),n=O(t);if(e===t)return{valid:!0,data:e};if(s===j.object&&n===j.object){const s=w.objectKeys(t),n=w.objectKeys(e).filter((e=>-1!==s.indexOf(e))),r={...e,...t};for(const s of n){const n=_e(e[s],t[s]);if(!n.valid)return{valid:!1};r[s]=n.data}return{valid:!0,data:r}}if(s===j.array&&n===j.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let n=0;n<e.length;n++){const r=_e(e[n],t[n]);if(!r.valid)return{valid:!1};s.push(r.data)}return{valid:!0,data:s}}return s===j.date&&n===j.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class be extends V{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(e,n)=>{if(I(e)||I(n))return P;const r=_e(e.value,n.value);return r.valid?((M(e)||M(n))&&t.dirty(),{status:t.value,value:r.data}):(Z(s,{code:S.invalid_intersection_types}),P)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}be.create=(e,t,s)=>new be({left:e,right:t,typeName:ze.ZodIntersection,...z(s)});class we extends V{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==j.array)return Z(s,{code:S.invalid_type,expected:j.array,received:s.parsedType}),P;if(s.data.length<this._def.items.length)return Z(s,{code:S.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),P;!this._def.rest&&s.data.length>this._def.items.length&&(Z(s,{code:S.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new B(s,e,s.path,t)):null})).filter((e=>!!e));return s.common.async?Promise.all(n).then((e=>E.mergeArray(t,e))):E.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new we({...this._def,rest:e})}}we.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new we({items:e,typeName:ze.ZodTuple,rest:null,...z(t)})};class ke extends V{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==j.object)return Z(s,{code:S.invalid_type,expected:j.object,received:s.parsedType}),P;const n=[],r=this._def.keyType,i=this._def.valueType;for(const e in s.data)n.push({key:r._parse(new B(s,e,s.path,e)),value:i._parse(new B(s,s.data[e],s.path,e))});return s.common.async?E.mergeObjectAsync(t,n):E.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return new ke(t instanceof V?{keyType:e,valueType:t,typeName:ze.ZodRecord,...z(s)}:{keyType:ee.create(),valueType:e,typeName:ze.ZodRecord,...z(t)})}}class xe extends V{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==j.map)return Z(s,{code:S.invalid_type,expected:j.map,received:s.parsedType}),P;const n=this._def.keyType,r=this._def.valueType,i=[...s.data.entries()].map((([e,t],i)=>({key:n._parse(new B(s,e,s.path,[i,"key"])),value:r._parse(new B(s,t,s.path,[i,"value"]))})));if(s.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const s of i){const n=await s.key,r=await s.value;if("aborted"===n.status||"aborted"===r.status)return P;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const s of i){const n=s.key,r=s.value;if("aborted"===n.status||"aborted"===r.status)return P;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}}}xe.create=(e,t,s)=>new xe({valueType:t,keyType:e,typeName:ze.ZodMap,...z(s)});class je extends V{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==j.set)return Z(s,{code:S.invalid_type,expected:j.set,received:s.parsedType}),P;const n=this._def;null!==n.minSize&&s.data.size<n.minSize.value&&(Z(s,{code:S.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&s.data.size>n.maxSize.value&&(Z(s,{code:S.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const r=this._def.valueType;function i(e){const s=new Set;for(const n of e){if("aborted"===n.status)return P;"dirty"===n.status&&t.dirty(),s.add(n.value)}return{status:t.value,value:s}}const a=[...s.data.values()].map(((e,t)=>r._parse(new B(s,e,s.path,t))));return s.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new je({...this._def,minSize:{value:e,message:$.toString(t)}})}max(e,t){return new je({...this._def,maxSize:{value:e,message:$.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}je.create=(e,t)=>new je({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...z(t)});class Oe extends V{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==j.function)return Z(t,{code:S.invalid_type,expected:j.function,received:t.parsedType}),P;function s(e,s){return F({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,R(),A].filter((e=>!!e)),issueData:{code:S.invalid_arguments,argumentsError:s}})}function n(e,s){return F({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,R(),A].filter((e=>!!e)),issueData:{code:S.invalid_return_type,returnTypeError:s}})}const r={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Fe){const e=this;return L((async function(...t){const a=new C([]),o=await e._def.args.parseAsync(t,r).catch((e=>{throw a.addIssue(s(t,e)),a})),c=await Reflect.apply(i,this,o);return await e._def.returns._def.type.parseAsync(c,r).catch((e=>{throw a.addIssue(n(c,e)),a}))}))}{const e=this;return L((function(...t){const a=e._def.args.safeParse(t,r);if(!a.success)throw new C([s(t,a.error)]);const o=Reflect.apply(i,this,a.data),c=e._def.returns.safeParse(o,r);if(!c.success)throw new C([n(o,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Oe({...this._def,args:we.create(e).rest(de.create())})}returns(e){return new Oe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new Oe({args:e||we.create([]).rest(de.create()),returns:t||de.create(),typeName:ze.ZodFunction,...z(s)})}}class Se extends V{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Se.create=(e,t)=>new Se({getter:e,typeName:ze.ZodLazy,...z(t)});class Ce extends V{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Z(t,{received:t.data,code:S.invalid_literal,expected:this._def.value}),P}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ae(e,t){return new Te({values:e,typeName:ze.ZodEnum,...z(t)})}Ce.create=(e,t)=>new Ce({value:e,typeName:ze.ZodLiteral,...z(t)});class Te extends V{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),s=this._def.values;return Z(t,{expected:w.joinValues(s),received:t.parsedType,code:S.invalid_type}),P}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return Z(t,{received:t.data,code:S.invalid_enum_value,options:s}),P}return L(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return Te.create(e)}exclude(e){return Te.create(this.options.filter((t=>!e.includes(t))))}}Te.create=Ae;class Re extends V{_parse(e){const t=w.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==j.string&&s.parsedType!==j.number){const e=w.objectValues(t);return Z(s,{expected:w.joinValues(e),received:s.parsedType,code:S.invalid_type}),P}if(-1===t.indexOf(e.data)){const e=w.objectValues(t);return Z(s,{received:s.data,code:S.invalid_enum_value,options:e}),P}return L(e.data)}get enum(){return this._def.values}}Re.create=(e,t)=>new Re({values:e,typeName:ze.ZodNativeEnum,...z(t)});class Fe extends V{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==j.promise&&!1===t.common.async)return Z(t,{code:S.invalid_type,expected:j.promise,received:t.parsedType}),P;const s=t.parsedType===j.promise?t.data:Promise.resolve(t.data);return L(s.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Fe.create=(e,t)=>new Fe({type:e,typeName:ze.ZodPromise,...z(t)});class Ze extends V{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,r={addIssue:e=>{Z(s,e),e.fatal?t.abort():t.dirty()},get path(){return s.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===n.type){const e=n.transform(s.data,r);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(s.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===s.common.async){const n=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===n.status?P:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((s=>"aborted"===s.status?P:("dirty"===s.status&&t.dirty(),e(s.value).then((()=>({status:t.value,value:s.value}))))))}if("transform"===n.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!U(e))return e;const i=n.transform(e.value,r);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>U(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}w.assertNever(n)}}Ze.create=(e,t,s)=>new Ze({schema:e,typeName:ze.ZodEffects,effect:t,...z(s)}),Ze.createWithPreprocess=(e,t,s)=>new Ze({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...z(s)});class Ee extends V{_parse(e){return this._getType(e)===j.undefined?L(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ee.create=(e,t)=>new Ee({innerType:e,typeName:ze.ZodOptional,...z(t)});class Pe extends V{_parse(e){return this._getType(e)===j.null?L(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:ze.ZodNullable,...z(t)});class Ne extends V{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===j.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ne.create=(e,t)=>new Ne({innerType:e,typeName:ze.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...z(t)});class Le extends V{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return D(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Le.create=(e,t)=>new Le({innerType:e,typeName:ze.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...z(t)});class Ie extends V{_parse(e){if(this._getType(e)!==j.nan){const t=this._getOrReturnCtx(e);return Z(t,{code:S.invalid_type,expected:j.nan,received:t.parsedType}),P}return{status:"valid",value:e.data}}}Ie.create=e=>new Ie({typeName:ze.ZodNaN,...z(e)});const Me=Symbol("zod_brand");class Ue extends V{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class De extends V{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?P:"dirty"===e.status?(t.dirty(),N(e.value)):this._def.out._parseAsync({data:e.value,path:s.path,parent:s})})();{const e=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?P:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:s.path,parent:s})}}static create(e,t){return new De({in:e,out:t,typeName:ze.ZodPipeline})}}class $e extends V{_parse(e){const t=this._def.innerType._parse(e);return U(t)&&(t.value=Object.freeze(t.value)),t}}$e.create=(e,t)=>new $e({innerType:e,typeName:ze.ZodReadonly,...z(t)});const Be=(e,t={},s)=>e?ue.create().superRefine(((n,r)=>{var i,a;if(!e(n)){const e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,o=null===(a=null!==(i=e.fatal)&&void 0!==i?i:s)||void 0===a||a,c="string"==typeof e?{message:e}:e;r.addIssue({code:"custom",...c,fatal:o})}})):ue.create(),qe={object:fe.lazycreate};var ze;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(ze||(ze={}));const Ve=ee.create,Je=se.create,We=Ie.create,Ke=ne.create,Ge=re.create,Qe=ie.create,He=ae.create,Ye=oe.create,Xe=ce.create,et=ue.create,tt=de.create,st=le.create,nt=pe.create,rt=he.create,it=fe.create,at=fe.strictCreate,ot=ge.create,ct=ve.create,ut=be.create,dt=we.create,lt=ke.create,pt=xe.create,ht=je.create,mt=Oe.create,ft=Se.create,gt=Ce.create,yt=Te.create,vt=Re.create,_t=Fe.create,bt=Ze.create,wt=Ee.create,kt=Pe.create,xt=Ze.createWithPreprocess,jt=De.create,Ot={string:e=>ee.create({...e,coerce:!0}),number:e=>se.create({...e,coerce:!0}),boolean:e=>re.create({...e,coerce:!0}),bigint:e=>ne.create({...e,coerce:!0}),date:e=>ie.create({...e,coerce:!0})},St=P;var Ct,At=Object.freeze({__proto__:null,defaultErrorMap:A,setErrorMap:function(e){T=e},getErrorMap:R,makeIssue:F,EMPTY_PATH:[],addIssueToContext:Z,ParseStatus:E,INVALID:P,DIRTY:N,OK:L,isAborted:I,isDirty:M,isValid:U,isAsync:D,get util(){return w},get objectUtil(){return k},ZodParsedType:j,getParsedType:O,ZodType:V,ZodString:ee,ZodNumber:se,ZodBigInt:ne,ZodBoolean:re,ZodDate:ie,ZodSymbol:ae,ZodUndefined:oe,ZodNull:ce,ZodAny:ue,ZodUnknown:de,ZodNever:le,ZodVoid:pe,ZodArray:he,ZodObject:fe,ZodUnion:ge,ZodDiscriminatedUnion:ve,ZodIntersection:be,ZodTuple:we,ZodRecord:ke,ZodMap:xe,ZodSet:je,ZodFunction:Oe,ZodLazy:Se,ZodLiteral:Ce,ZodEnum:Te,ZodNativeEnum:Re,ZodPromise:Fe,ZodEffects:Ze,ZodTransformer:Ze,ZodOptional:Ee,ZodNullable:Pe,ZodDefault:Ne,ZodCatch:Le,ZodNaN:Ie,BRAND:Me,ZodBranded:Ue,ZodPipeline:De,ZodReadonly:$e,custom:Be,Schema:V,ZodSchema:V,late:qe,get ZodFirstPartyTypeKind(){return ze},coerce:Ot,any:et,array:rt,bigint:Ke,boolean:Ge,date:Qe,discriminatedUnion:ct,effect:bt,enum:yt,function:mt,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Be((t=>t instanceof e),t),intersection:ut,lazy:ft,literal:gt,map:pt,nan:We,nativeEnum:vt,never:st,null:Xe,nullable:kt,number:Je,object:it,oboolean:()=>Ge().optional(),onumber:()=>Je().optional(),optional:wt,ostring:()=>Ve().optional(),pipeline:jt,preprocess:xt,promise:_t,record:lt,set:ht,strictObject:at,string:Ve,symbol:He,transformer:bt,tuple:dt,undefined:Ye,union:ot,unknown:tt,void:nt,NEVER:St,ZodIssueCode:S,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:C});!function(e){e[e.SPOT_MODERATE_IGNORE=0]="SPOT_MODERATE_IGNORE",e[e.SPOT_MODERATE_ACCEPT=1]="SPOT_MODERATE_ACCEPT",e[e.SPOT_MODERATE_PENDING=2]="SPOT_MODERATE_PENDING"}(Ct||(Ct={}));const Tt=At.object({RF_Constant_levelName:At.string(),RF_delete:At.boolean(),RF_editing:At.boolean(),RF_level:At.number(),RF_levelName:At.string(),RF_levelName_Trad:At.string(),RF_parameters:At.boolean(),RF_setAdmin:At.boolean(),RF_spotit:At.boolean(),RF_spotit_own:At.boolean()}),Rt=e=>Tt.safeParse(e).success;class Ft extends n{list(e,t,s,n=[{name:"dateCreation",sort:"DESC"}]){return this.jApi.article.list({type:"aseiClearanceTicket",format:"raw-view",limit:t,page:e,orders:n,filters:s})}requestStatus(e,t,s){return this.network.post({o:"asei",f:"setStatus",uri:e,requestedStatus:t,audience:s})}getDedicatedGroups(){return this.network.post({o:"asei",f:"getDedicatedGroups"})}getConfiguration(){return this.network.post({o:"asei",f:"configuration"})}}class Zt extends n{tenants(){return this.network.post({o:"drive",f:"getTenants"})}groups(e,t){return this.network.post({o:"drive",f:"getGroups",query:e,filter:t})}sites(){return this.network.post({o:"drive",f:"getSites"})}listAccount(e){return this.network.post({o:"drive",f:"listAccount",service:e})}isAccountLogged(e,t){return this.network.post({o:"drive",f:"isAccountLogged",service:e,id:t})}checkAccountToken(e){return this.network.post({o:"drive",f:"checkAccountToken",service:e})}documents(e,t){return this.network.post({o:"drive",f:"getDocuments",service:e,documentParams:t})}}class Et extends n{GetUnclassifiedFiles(e){var t;return this.network.post({o:"objectListMediaLibrary",f:"GetUnclassifiedFiles",format:e.format,page:null!==(t=e.page)&&void 0!==t?t:1,limit:e.limit,nolimit:e.nolimit})}getAccess(){return this.network.post({o:"mediaLibrary",f:"access"})}}class Pt extends n{getLogs({dateEnd:e,idLogMax:t}){return this.network.post({o:"jLand",f:"adminLogs",dateEnd:e,idLogMax:t})}getStats({map:e,dateStart:t,dateEnd:s}){return this.network.post({o:"jLand",f:"adminStats",map:e,dateStart:t,dateEnd:s})}getAllMapsAsAdmin(e="raw-list,licenses"){return this.network.post({o:"objectListJLand",f:"jLandList",format:e})}createMap(e,t="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},e),{o:"article",f:"create",format:t,type:"jlandmap"}))}}class Nt extends n{sendMessage(e,t){return this.network.post({o:"messenger",f:"newMessage",idDiscussion:t,msg:{description:e}})}getOrCreateDiscussion(e,t){const s=e<t?`${e}.${t}`:`${t}.${e}`;return this.network.post({o:"messenger",f:"getDiscussion",idDiscussion:s,type:"messengerUser",idUserTo:t})}}class Lt extends n{getConfig(){return this.network.post({o:"search",f:"getConfig"})}proposition({query:e,format:t},s){return this.network.post({o:"search",f:"proposition",query:e,format:t||"little"},s)}searchQuery(e,t){const{keywords:s,category:n,facetCategories:r,filters:i,page:a,limit:o,sort:c,options:u}=e;return this.network.post({o:"search",f:"query",keywords:s,category:n,facetCategories:r,filters:i,page:a,limit:o,sort:c,options:u},t)}getLastQueries(){return this.network.post({o:"search",f:"getLastQueries"})}getAdminConfig(){return this.network.post({o:"search",f:"getAdminConfig"})}setAdminConfig(e){return this.network.post({o:"search",f:"setAdminConfig",config:e})}}var It=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s};class Mt extends n{list(){return this.network.post({o:"taxonomy",f:"list",format:"raw-little"}).then((e=>{if(Array.isArray(e.result))return e.result;throw"Bad response from backend"}))}create(e){var{format:t="raw-little"}=e,s=It(e,["format"]);return this.network.post(Object.assign({o:"taxonomy",f:"create",format:t},s))}autocomplete(e,t){return this.network.post({o:"autocomplete",f:"taxonomy",q:t,idTaxonomy:e,idToUri:!1})}autocompleteList(e){var{format:t="autocomplete"}=e,s=It(e,["format"]);return this.network.post(Object.assign({o:"objectListTaxonomy",f:"concept",format:t},s))}autocompleteHierarchy(e){return this.network.post(Object.assign({o:"objectListTaxonomyHierarchy",f:"concept"},e))}}class Ut extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"user",q:e,idToUri:!1}).then((e=>e.result))}get(e,t="little",s){return this.network.post({o:"user",f:"get",uri:e,format:t},s)}updateImage(e,t="raw-little"){return this.network.postCSRF({o:"user",f:"updateImage",idFile:e,format:t})}updateBanner(e,t="raw-little"){return this.network.postCSRF({o:"user",f:"updateBanner",idFile:e,format:t})}updateMail(e,t){return this.network.postCSRF({o:"user",f:"editMail",mail:e,password:t})}userUpdateProfile(e){return this.network.postCSRF(Object.assign({o:"user",f:"updateProfile"},e))}configuration(){return this.network.post({o:"userDirectory",f:"configuration"})}fieldsConfiguration(){return this.network.post({o:"user",f:"fieldsConfiguration"})}userList(e,t){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserList"},e),t)}userQueryList(e){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserQueryList"},e))}userMap(e){return this.network.post(Object.assign({o:"objectListJamespot",f:"userMap"},e))}userBusinessContactQueryList(e){return this.network.post(Object.assign({o:"businessContact",f:"queryList"},e))}userCreateBusinessContact(e){const t=Object.assign(Object.assign({},e),{pseudo:e.title,firstName:e.firstname,lastName:e.lastname,champ1:e.field1,champ2:e.field2,champ3:e.field3,champ4:e.field4,champ5:e.field5}),s=Object.assign(Object.assign({},t),{type:"businessContactCard",publishTo:"networkPublic/1"});return this.jApi.article.create(s)}userUpdateBusinessContact(e){const t=Object.assign(Object.assign({},e),{pseudo:e.title,firstName:e.firstname,lastName:e.lastname,champ1:e.field1,champ2:e.field2,champ3:e.field3,champ4:e.field4,champ5:e.field5}),s=Object.assign(Object.assign({},t),{uri:e.uri,publishTo:"networkPublic/1"});return this.jApi.article.update(s)}userDeleteBusinessContact(e){return this.jApi.article.delete(e)}userAddContact(e){return this.network.post({o:"user",f:"addContact",idUser:e})}userRemoveContact(e){return this.network.post({o:"user",f:"removeContact",idUser:e})}signIn(e,t){return this.network.post({o:"user",f:"signIn",mail:e,password:t})}getFields(e,t){return this.network.post({o:"user",f:"getFields",idUser:e,fieldsType:t})}}class Dt extends n{getFiles(e){return this.network.post(Object.assign({o:"onlyOffice",f:"getFiles"},e))}getFile(e,t){return this.network.post({o:"onlyOffice",f:"getFile",idFile:e,hash:t})}getTemplates(e){return this.network.post({o:"onlyOffice",f:"getTemplates"},e)}deleteFile(e,t){return this.network.postCSRF({o:"onlyOffice",f:"deleteFile",idFile:e,withParent:t})}createFile(e,t,s){return this.network.postCSRF({o:"onlyOffice",f:"createFile",title:e,type:t,publishTo:s})}updateFile(e,t){return this.network.postCSRF({o:"onlyOffice",f:"updateFile",idFile:e,title:t})}createVersion(e){return this.network.post({o:"onlyOffice",f:"createVersion",idFile:e})}setAccessRequest(e,t,s,n){return this.network.postCSRF({o:"onlyOffice",f:"setAccessRequest",uri:e,idUser:t,requestAccessValue:s,requestResponseMessage:n})}getAccessRequest(e,t){return this.network.post({o:"onlyOffice",f:"getAccessRequest",format:"raw-little",uri:e,idUser:t})}askAccess(e,t,s){return this.network.postCSRF({o:"onlyOffice",f:"askAccess",uri:e,askAccess:t,askMessage:s})}}class $t extends n{createChannel(e,t="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},e),{o:"article",f:"create",format:t,type:"tvDisplayChannel"}))}getChannel(e){return this.network.post(Object.assign(Object.assign({},e),{o:"tvDisplay",f:"getChannel"}))}getConfigureChannel(e){return this.network.post(Object.assign(Object.assign({},e),{o:"tvDisplay",f:"getConfigureChannel"}))}}class Bt extends n{contentObjectLinks(e){return this.network.post({o:"shared",f:"contentObjectLinks",format:"raw-little",uri:e})}contentSetObjectAccessRule(e,t,s){return this.network.postCSRF({o:"shared",f:"contentSetObjectAccessRule",format:"raw-little",uri:e,rule:t,hash:s})}}var qt=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class zt extends n{SaveAnimationConfiguration(e){return qt(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"saveConfiguration",animation:e})}))}DeleteAnimation(){return qt(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"deleteAnimation"})}))}GetCurrentAnimation(){return qt(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getConfiguration"})}))}GetCurrentAnimationApp(){return qt(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getConfigurationApp"})}))}ToggleAnimationActive(){return qt(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"toggleAnimationActive"})}))}GetAnimationActive(){return qt(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getAnimationActive"})}))}}class Vt extends n{getObject(e){return this.network.post({o:"object",f:"getObject",uri:e})}setAccess(e,t,s,n){return this.network.post({o:"object",f:"setAccess",uri:e,access:t,message:s,generalAccessRule:n})}getAccess(e){return this.network.post({o:"object",f:"getAccess",uri:e})}getAccessHash(e){return this.network.post({o:"object",f:"getAccessHash",uri:e})}}class Jt extends n{getFileBanks(e){return this.network.post({o:"file-sync",f:"getFileBanks"},e)}saveFileBanks(e){return this.network.post({o:"file-sync",f:"saveFileBanks",fileBanks:e})}getUserQuota(e){return this.network.post({o:"file-sync",f:"getUserQuota"},e)}getAdminSpots(e,t){return this.network.post(Object.assign({o:"objectList",f:"fileSyncAdminSpots"},e),t)}}class Wt extends n{getUsers(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"getUsers"},e),{format:null!=t?t:"raw-list"}))}add(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"add"},e),{format:null!=t?t:"raw-little"}))}remove(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"remove"},e),{format:null!=t?t:"raw-little"}))}}class Kt extends n{textEnhancement({text:e,capacity:t}){return this.network.post({o:"jia",f:"textEnhancement",text:e,capacity:t})}}class Gt extends n{responseUserList(e,t,s){return this.network.post({o:"widget",f:"responseUserList",uri:e,uniqid:t,page:s})}removeWidget({id:e,type:t,uniqid:s}){return this.network.post({o:"widget",f:"removeWidget",id:e,type:t,uniqid:s})}checkListRespond({id:e,type:t,idUser:s,uniqid:n,index:r}){return this.network.post({o:"widget",f:"checkListRespond",id:e,type:t,uniqid:n,idUser:s,index:r})}}class Qt{constructor(e){this.version="1.0",this.network=e,this.admin={license:new r(this),store:new i(this),utils:new a(this)},this.application=new o(this),this.article=new c(this),this.asei=new Ft(this),this.assetReservation=new d(this),this.audience=new l(this),this.bookmark=new p(this),this.businessNetworking=new h(this),this.community=new m(this),this.diapazone=new f(this),this.drive=new Zt(this),this.faq=new v(this),this.file=new y(this),this.filebank=new _(this),this.fileSync=new Jt(this),this.global=new b(this),this.group=new x(this),this.jia=new Kt(this),this.jland=new Pt(this),this.mediaLibrary=new Et(this),this.messenger=new Nt(this),this.object=new Vt(this),this.search=new Lt(this),this.share=new Bt(this),this.socialAction=new Wt(this),this.taxonomy=new Mt(this),this.tvDisplay=new $t(this),this.user=new Ut(this),this.wedoc=new Dt(this),this.widget=new Gt(this),this.animations=new zt(this)}}var Ht=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class Yt{constructor(e,t="api-front"){this.window=e,this.action=t}static _formatPostOptions(e){const t=e?{body:JSON.stringify(e)}:void 0;return Object.assign({method:"POST",credentials:"same-origin"},t)}getUrl(e,t){return Ht(this,void 0,void 0,(function*(){const s=yield this.window.getBackendUrl();let n;try{n=new URL(`/${this.action}/${e}/${t}`,s).href}catch(r){n=`${s}/${this.action}/${e}/${t}`}return n}))}getHostname(){return Ht(this,void 0,void 0,(function*(){const e=(yield this.window.getBackendUrl()).split("//");return e.length>1?e[1]:e[0]}))}fetch(e,t){var{o:s,f:n}=e,r=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["o","f"]);return Ht(this,void 0,void 0,(function*(){void 0===t&&(t=null);const e=yield this.getUrl(s,n);return this.window.fetch(e,Object.assign(Object.assign({},Yt._formatPostOptions(r)),{signal:t}))}))}post(e,t){return this.fetch(e,t).then((e=>e.json())).then((e=>{if(0===e.error)return e;throw{error:e.error,errorMsg:e.errorMsg,messages:e.messages}})).catch((e=>{if(t&&t.aborted)throw{error:-1,aborted:!0};throw e}))}postFile(e){return Ht(this,void 0,void 0,(function*(){const t=yield this.getUrl("file","create");if(e.append("format","raw-little"),!e.has("token")){const{result:t}=yield this.token();e.append("token",t)}const s=e.get("token");return s&&"string"==typeof s?this.window.fetch(t,{method:"POST",credentials:"same-origin",body:e}).then((e=>e.json())).then((e=>({response:e,token:s}))):Promise.reject("Missing token")}))}postCSRF(e){return this.tokenCSRF().then((t=>this.post(Object.assign(e,{tokenCSRF:t.result}))))}postToken(e){return this.token().then((t=>this.post(Object.assign(e,{token:t.result}))))}maybePostToken(e){return"token"in e&&e.token?this.post(e):this.postToken(e)}token(){return this.post({o:"misc",f:"token"})}tokenCSRF(){return this.post({o:"misc",f:"tokenCSRF"})}}class Xt{getBackendUrl(){return e=this,t=void 0,n=function*(){const e=window.location;return`${e.protocol}//${e.host}`},new((s=void 0)||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}));var e,t,s,n}fetch(e,t){return window.fetch(e,t)}}const es=At.object({create:At.boolean(),read:At.boolean(),publish:At.boolean(),administrate:At.boolean(),update:At.boolean(),delete:At.boolean(),comment:At.boolean(),member:At.boolean()}),ts=e=>es.safeParse(e).success,ss=At.string(),ns=At.string().nullable(),rs=At.number(),is=At.string().nullable(),as=At.string().nullable(),os=At.string().nullable(),cs=At.number(),us=At.string(),ds=At.string(),ls=At.union([cs,os,as,is,us,rs,ns,ss,ds]),ps={ADMIN:9,USER:5,EXTERNAL:3,GUEST:0},hs=At.lazy((()=>Zs.extend({title:At.string(),_url:At.string(),level:At.nativeEnum(ps),dateCreation:At.string(),dateModified:At.string()}).catchall(ls))),ms=At.lazy((()=>hs.schema.extend({active:At.number()}))),fs=e=>ms.safeParse(e).success,gs=ms,ys=e=>gs.safeParse(e).success,vs=At.object({idInType:At.number(),lat:At.number(),lng:At.number()}),_s=e=>vs.safeParse(e).success,bs=At.object({title:At.string(),firstname:At.string(),lastname:At.string(),mail:At.union([At.string(),At.undefined()]).optional(),description:At.string().optional(),dateOfBirth:At.string().optional(),phoneNumber:At.string().optional(),language:At.string().optional(),timeZone:At.string().optional(),mobileNumber:At.string().optional(),company:At.string().optional(),country:At.string().optional(),department:At.string().optional(),function:At.string().optional(),webSite:At.string().optional(),image:At.union([At.string(),At.undefined()]).optional(),userBanner:At.union([At.string(),At.undefined()]).optional(),field1:At.string().optional(),field2:At.string().optional(),field3:At.string().optional(),field4:At.string().optional(),field5:At.string().optional()}),ws=bs.required().extend({level:At.string(),image:At.string().optional(),businessManagementManager:hs.array().optional(),businessNetworkingUserToCompanySrc:hs.array().optional()}),ks=At.object({user_field_edit_profil:At.record(bs.keyof(),At.number()),user_field_editable:At.record(bs.keyof(),At.number()),user_field_my_page:At.record(bs.keyof(),At.number()),user_page_mandatory_fields:At.object({firstname:At.enum(["0","1"]),lastname:At.enum(["0","1"]),pseudo:At.enum(["0","1"])})}),xs=At.object({name:At.string(),value:At.union([At.string(),At.record(At.string(),At.any())])}),js=At.enum(["popover"]),Os=At.object({values:ws,mobileEditableFields:ws.keyof().array()}),Ss=At.object({mail:At.union([At.string(),At.undefined()]),title:At.string(),firstname:At.string(),lastname:At.string(),phoneNumber:At.union([At.string(),At.undefined()]).optional(),company:At.union([At.string(),At.undefined()]).optional(),function:At.union([At.string(),At.undefined()]).optional(),uri:At.union([At.string(),At.undefined()]).optional(),field1:At.union([At.string(),At.undefined()]).optional(),field2:At.union([At.string(),At.undefined()]).optional(),field3:At.union([At.string(),At.undefined()]).optional(),field4:At.union([At.string(),At.undefined()]).optional(),field5:At.union([At.string(),At.undefined()]).optional()}),Cs=At.object({userDirectoryShow:At.union([At.literal(""),At.literal("1")]),contactDirectoryShow:At.union([At.literal("0"),At.literal("1")]),businessContactShow:At.boolean(),menu:At.union([At.literal("0"),At.literal("1")]),cardFields:At.string().array(),tableFields:At.string().array(),viewFields:At.string().array(),userGeoloc:At.boolean().optional(),sort:At.string(),cnt:At.number().optional(),filters:At.object({name:At.string(),type:At.string()}).array()}),As=e=>Cs.safeParse(e).success,Ts=At.lazy((()=>Es.extend({dateCreation:At.string(),dateModified:At.string(),firstname:At.string(),lastname:At.string(),active:At.number(),mail:At.string().optional()}))),Rs=e=>Ts.safeParse(e).success,Fs=At.lazy((()=>Es.extend({id:At.string(),shortUri:At.string(),name:At.string(),label:At.string(),cssClass:At.string(),cssColor:At.string(),class:At.string(),Pseudo:At.string(),_values:At.record(At.string(),At.unknown())}))),Zs=At.object({id:At.number(),mainType:At.string(),type:At.string(),uri:At.string(),dateCreation:At.string().optional(),dateModified:At.string().optional().nullable()}),Es=Zs.extend({title:At.string(),_url:At.string()}),Ps=e=>Es.safeParse(e).success,Ns=At.lazy((()=>Es.extend({description:At.string().optional().nullable(),_user:hs,_right:es}))),Ls=e=>Ns.safeParse(e).success,Is=At.object({attrName:At.string(),token:At.string(),file:At.instanceof(File).nullable().optional(),url:At.string().optional()}),Ms=At.object({width:At.number(),height:At.number()}),Us=At.object({x:At.number(),y:At.number(),w:At.number(),h:At.number(),rotation:At.number(),killSize:At.boolean().optional()}),Ds=Es.extend({dateCreation:At.string(),dateModified:At.string().nullable(),mimetype:At.string(),path:At.string().optional(),size:At.number()}),$s=e=>Ds.parse(e),Bs=Ds.extend({_extend:At.object({crop:Us})}),qs=At.object({name:At.string(),filename:At.string(),dateModified:At.string(),mimetype:At.string()}),zs=At.object({idUser:At.string(),dateDownload:At.string(),Pseudo:At.string(),type:At.string()}),Vs=e=>At.object({isActive:At.boolean()}).and(e),Js=At.enum(["drive_microsoft_graph","drive_dropbox","drive_google"]),Ws=Vs(At.object({drives:At.record(Js,At.boolean())})),Ks=Vs(At.object({label:At.string()})),Gs=Vs(At.object({orderBy:At.string(),order:At.enum(["ASC","DESC"])})),Qs=Vs(At.object({})),Hs=Vs(At.object({create:At.boolean(),autorize:At.array(At.enum(["message","comment","board","article"]).optional())})),Ys=At.object({DriveHook:Ws,calendarHook:Ks,FileBankHook:Gs,spotRssFeed:Qs,WidgetHook:Hs}).partial(),Xs=e=>Ys.and(At.record(At.string(),At.any())).parse(e),en="accept",tn="deny";function sn(e){const t=e;return t&&"number"==typeof t.id&&"number"==typeof t.targetId}const nn={bookmarkLink:sn},rn={isBookmarkLink:function(e){return"targetId"in e&&!!e.targetId},isBookmarkCustom:function(e){const t=e;return void 0!==t.bookmarkLabel||void 0!==t.bookmarkMeta||void 0!==t.bookmarkUrl},isBookmarkRawList:sn,isTVChannelType:function(e,t){return"tvChannelType"in e&&e.tvChannelType===t},objectIsType:function(e,t){return null!=t&&nn[e](t)},isStandardApiError:e=>"object"==typeof e&&null!==e&&"error"in e&&"errorMsg"in e&&"messages"in e&&"number"==typeof e.error&&"string"==typeof e.errorMsg&&Array.isArray(e.messages),isAbortApiError:e=>null!==e&&"object"==typeof e&&"error"in e&&"aborted"in e&&-1===e.error&&!0===e.aborted};function an(e,t){return e&&!e.endsWith(t)?`${e}${t}`:e}function on(e,t){return e&&e.startsWith(t)?e.split("").slice(t.length).join(""):e}function cn(e){return e.toString().padStart(2,"0")}function un(e){return"uri"in e&&e.uri?e.uri:`${e.type}/${e.recordId}`}function dn(e){return on(an(e.from,"/"),"/")||""}function ln(e){return e.timestamp?`?_=${e.timestamp}`:""}function pn(e){const t=[];return"timestamp"in e&&e.timestamp&&t.push(`_=${e.timestamp}`),"iconColor"in e&&e.iconColor&&t.push(`color=${e.iconColor}`),t.length?"?"+t.join("&"):""}function hn(e,t=2){return"size"in e&&e.size?e.size:"width"in e&&e.width&&"height"in e&&e.height?`${e.width*t}x${e.height*t}`:""}function mn(e){return e.format||"png"}function fn(e){try{return new URL(e)}catch(e){}try{return new URL(window.location.origin+"/"+on(e,"/"))}catch(e){}}function gn(e,t=2){if("url"in e&&e.url){const t=fn(e.url);if(t)return"timestamp"in e&&e.timestamp&&!t.searchParams.has("_")&&t.searchParams.append("_",e.timestamp.toString()),t.toString()}return`/${dn(e)}${hn(e,t)}/${un(e)}.${mn(e)}${pn(e)}`}const yn=["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pdf","application/zip","application/illustrator","application/postscript","application/vnd.ms-opentype","application/x-font-ttf","application/octet-stream","audio/mp3","audio/mpeg","font/ttf","font/otf","image/jpeg","image/jpg","image/png","image/gif","image/vnd.adobe.photoshop","image/svg+xml","text/plain","text/csv","video/mp4","video/webm"],vn=["docx","xlsx","csv","pptx","pdf","zip","ai","mp3","mpeg","ttf","otf","jpg","jpeg","png","gif","psd","svg","txt","mp4","odt","webm"],_n={"application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.oasis.opendocument.text":"odt","application/pdf":"pdf","application/zip":"zip","application/x-zip-compressed":"zip","application/illustrator":"ai","application/postscript":"ai","audio/mp3":"mp3","audio/mpeg":"mpeg","font/ttf":"ttf","font/otf":"otf","image/jpeg":"jpeg","image/jpg":"jpg","image/png":"png","image/gif":"gif","application/x-font-ttf":"ttf","application/vnd.ms-opentype":"otf","image/vnd.adobe.photoshop":"psd","image/svg+xml":"svg","text/plain":"txt","text/csv":"xlsx","video/mp4":"mp4","video/webm":"mp4"},bn=e=>Object.keys(_n).find((t=>_n[t]===e)),wn=e=>{var t;return null!==(t=_n[e])&&void 0!==t?t:void 0};function kn(e){const t=String(e).split(".").pop();return vn.find((e=>e===t))}const xn=e=>{var t;const s=kn(e);return null!==(t=bn(s))&&void 0!==t?t:"application/octet-stream"},jn=e=>e?(new Date(e).getTime()/1e3).toFixed(0):void 0,On=(e,t="fitx80")=>{const s=Fn(e),n=jn(e.dateModified);switch(s){default:return;case"video":return`/media/${e.id}.mp4?stream=true`+(n?`&_=${n}`:"");case"audio":return`/media/${e.id}.mp3`+(n?`?_=${n}`:"");case"gif":return gn({timestamp:n,size:t,from:"imagecache",uri:e.uri,format:"gif"});case"image":return gn({timestamp:n,size:t,from:"imagecache",uri:e.uri})}},Sn=e=>{const t=kn(e);return void 0!==t?An(bn(t)):"application"},Cn=e=>-1!==["image/vnd","image/svg","image/heic"].findIndex((t=>e.startsWith(t)));function An(e){return e&&e.startsWith("folder/")?"folder":null==e||Cn(e)?"application":e.startsWith("image/gif")?"gif":e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":e.startsWith("font/")||e.startsWith("application/x-font-ttf")||e.startsWith("application/vnd.ms-opentype")?"font":e.startsWith("text/")?"text":"application"}const Tn=(e,t,s="rr")=>"ng"===s?`/ng/file/${e}/${t}`:`/ng/rr/file/${e}/${t}`,Rn=e=>void 0===e.mimetype||"application/octet-stream"===e.mimetype?xn(e.title):e.mimetype,Fn=e=>void 0===e.mimetype||"application/octet-stream"===e.mimetype?Sn(e.title):An(e.mimetype),Zn=Array.isArray,En=Object.keys,Pn=Object.prototype.hasOwnProperty;function Nn(e,t,s){const n=null==s?void 0:s.map((e=>e.split(".")));if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const r=Zn(e),i=Zn(t);let a,o,c;if(r&&i){if(o=e.length,o!==t.length)return!1;for(a=o;0!=a--;)if(!Nn(e[a],t[a],s))return!1;return!0}if(r!==i)return!1;const u=e instanceof Date,d=t instanceof Date;if(u!==d)return!1;if(u&&d)return e.getTime()===t.getTime();const l=e instanceof RegExp,p=t instanceof RegExp;if(l!==p)return!1;if(l&&p)return e.toString()===t.toString();const h=En(e).filter((e=>!(null==n?void 0:n.some((t=>1===t.length&&t[0]===e)))));if(o=h.length,o!==En(t).filter((e=>!(null==n?void 0:n.some((t=>1===t.length&&t[0]===e))))).length)return!1;for(a=o;0!=a--;)if(!Pn.call(t,h[a]))return!1;for(a=o;0!=a--;)if(c=h[a],!("_owner"===c&&e.$$typeof||Nn(e[c],t[c],null==n?void 0:n.filter((e=>e.length>1&&e[0]===c)).map((e=>e.splice(1).join("."))))))return!1;return!0}return e!=e&&t!=t}function Ln(e,t){if(Array.isArray(e))return e.map((e=>Ln(e,t)));if("object"==typeof e&&null!==e){let s={};return Object.keys(e).forEach((n=>{s=Object.assign(Object.assign({},s),{[n]:n&&t.includes(n)?typeof e[n]:Ln(e[n],t)})})),s}return e}function In(e){return e.startsWith("tag_")||"tags"===e}function Mn(e){return Object.fromEntries(Object.entries(e).filter((([e])=>In(e))))}function Un(e,t,s){return Object.fromEntries(Object.entries(e).filter((([e])=>In(e))).map((([e,n])=>{const r=Array.isArray(n)?n.map((e=>"object"==typeof e&&e&&t in e?e[t]:e)):n;return[e,s?s(r):r]})))}function Dn(e){return Un(e,"uri")}const $n=e=>{var t;let s={};"_errors"in e&&(s._errors=e._errors),"_options"in e&&(s._options=e._options),"title"in e&&(s.title=e.title),"description"in e&&(s.description=e.description),"activity"in e&&(s.activity=e.activity),"image"in e&&(s.image=e.image),"uri"in e&&(s.uri=e.uri),"type"in e&&(s.type=e.type),"edito"in e&&(s.edito=e.edito),"category"in e&&(s.category=e.category.toString()),"commentLevel"in e&&(s.commentLevel=e.commentLevel),"_options"in e&&(null===(t=e._options)||void 0===t?void 0:t.custom_widgets)&&(s.custom_widgets=Array.isArray(e._options.custom_widgets)?{}:e._options.custom_widgets),"displayType"in e&&(s.displayType=e.displayType),"language"in e&&(s.language=e.language),"edit_access"in e&&(s.edit_access=e.edit_access),"lock_mail"in e&&(s.lock_mail=e.lock_mail),"fileSyncEnabled"in e&&(s.fileSyncEnabled=e.fileSyncEnabled),"fileSyncVersioningType"in e&&(s.fileSyncVersioningType=e.fileSyncVersioningType),"fileBankQuota"in e&&(s.fileBankQuota=e.fileBankQuota),"idCommunity"in e&&(s.idCommunity=e.idCommunity),"lastRssExecution"in e&&(s.lastRssExecution=e.lastRssExecution),"mail_comment"in e&&(s.mail_comment=e.mail_comment),"mail_frequency"in e&&(s.mail_frequency=e.mail_frequency),"mail_spotit"in e&&(s.mail_spotit=e.mail_spotit),"mail_subscriber"in e&&(s.mail_subscriber=e.mail_subscriber),"notifyFolder"in e&&(s.notifyFolder=e.notifyFolder),"nounsubscribe"in e&&(s.nounsubscribe=e.nounsubscribe),"privacy"in e&&(s.privacy=e.privacy),"publishFolder"in e&&(s.publishFolder=e.publishFolder),"rss_access"in e&&(s.rss_access=e.rss_access),"rss_feed"in e&&(s.rss_feed=e.rss_feed&&Array.isArray(e.rss_feed)?JSON.stringify(e.rss_feed.map((e=>{var{_user:t}=e,s=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["_user"]);return Object.assign(Object.assign({},s),{idUser:null==t?void 0:t.id})}))):"[]"),"rss_key"in e&&(s.rss_key=e.rss_key),"spot_right_user"in e&&(s.spot_right_user=e.spot_right_user),"spotBanner"in e&&(s.spotBanner=e.spotBanner),"spotDefaultPublishType"in e&&(s.spotDefaultPublishType=e.spotDefaultPublishType),"user_level_signup"in e&&(s.user_level_signup=e.user_level_signup),"useTeaser"in e&&(s.useTeaser=e.useTeaser),"widgets"in e&&(s.widgets=e.widgets);const n=Mn(e);if(s=Object.assign(Object.assign({},s),n),Bn(e,s))return s;throw new Error},Bn=(e,t)=>{const s=["id","mainType","dateCreation","dateModified","_url","o2apLinksSources"],n=["custom_widgets"],r=Object.keys(e),i=Object.keys(t),a=r.filter((e=>!i.includes(e)&&!s.includes(e))),o=i.filter((e=>!r.includes(e)&&!n.includes(e))),c=[...a.map((e=>"- "+e)),...o.map((e=>"+ "+e))];if(a.length>0||o.length>0)throw new Error(`prepareGroupForUpdate :: Wrong group mapping | Diff : ${JSON.stringify(c)}`);return!0},qn=new Yt(new Xt),zn=new Qt(qn);window.JamespotUserApi=zn;const Vn=zn,Jn=Qt;module.exports=s})();
|
|
2
2
|
//# sourceMappingURL=jamespot-user-api.js.map
|