{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/Display.vue","webpack:///src/Display.vue","webpack:///./src/Display.vue?80e4","webpack:///./src/Display.vue?7ca6","webpack:///./src/utils/display.js","webpack:///./src/mtapi/cart.js","webpack:///./src/mtapi/entity.js","webpack:///./src/mtapi/browser.js","webpack:///./src/mtapi/index.js","webpack:///./src/Display.vue?6be0","webpack:///./src/mtapi/core.js","webpack:///./src/mtapi/document.js","webpack:///./src/utils/public-path.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","render","_vm","this","_c","_self","ready","showConfig","_v","_s","config","Settings","_e","staticRenderFns","props","components","dev","advertsByID","methods","loadCSS","console","styletag","head","loadAdverts","link","target","loadRandomSlots","loadAdvertToSlot","component","Vue","productionTip","mtapi","iParts","Array","from","document","getElementsByTagName","process","map","x","id","forEach","ContentKey","getElementById","attributes","ContentItemKey","h","Display","$mount","CartManager","constructor","current","selectedPartyId","clientContext","loggedInPartyId","response","axios","Count","created","createCart","updateCartCount","Items","$values","error","currentDate","Date","cartData","$type","UserId","ComboOrder","Order","BillToCustomerParty","PartyId","Delivery","Lines","SoldToCustomerParty","UpdateInformation","CreatedBy","CreatedOn","toISOString","UpdatedBy","UpdatedOn","post","status","delete","CartId","productCode","quantity","lineIndex","productLineInCart","QuantityOrdered","Amount","lineData","OrderLineId","guid","Item","ItemId","LineNumber","CanCombine","put","warn","findIndex","productQuantityInCart","currentQuantity","updateCartItemCount","cart","ImisEntity","source","writable","_data","JSON","parse","Properties","Name","Value","$value","set","configurable","getOwnPropertyNames","propertyName","isArray","toLowerCase","includes","arr","item","obj","getObject","getJSON","stringify","ImisEntityCollection","startsWith","Offset","Limit","TotalCount","HasNext","NextOffset","Entities","entity","openObjectBrowserDialog","documentPath","rootFolder","typeFilter","windowTitle","multiSelect","publishedOnly","options","showRecycleBin","hideAddress","showMenu","showMenuPublish","showMenuVersions","showMenuRun","showMenuPreview","hideMenuNew","hideMenuEdit","hideMenuOrganize","log","core","docs","browser","$mtapi","eventBus","uid","defaults","baseURL","gWebRoot","headers","common","RequestVerificationToken","withCredentials","callback","readyState","addEventListener","attachEvent","v4","isGuid","test","delay","ms","Promise","resolve","setTimeout","getDocumentByVersionKey","documentVersionKey","OperationName","EntityTypeName","Parameters","ParameterTypeName","UseJson","then","Result","getDocumentByPath","getIqaDefinition","documentPathOrVersionKey","System","String","base64ToBlob","base64","mime","sliceSize","byteChars","atob","byteArrays","offset","len","byteNumbers","charCodeAt","byteArray","Uint8Array","Blob","type","documentTypeIdToMime","async","documentTypeId","fileType","MimeType","split","downloadBlobAsFile","blob","filename","navigator","msSaveBlob","msSaveOrOpenBlob","element","createElement","setAttribute","URL","createObjectURL","style","display","body","appendChild","click","removeChild","getBlobAndFileNameFromDocumentSystem","base64Data","Data","DocumentTypeId","fileName","getBlobAndFileNameFromUDFile","xmlDoc","DOMParser","parseFromString","textContent","fileUploadToUDFile","file","encodedFile","btoa","pop","toUpperCase","readAsBinaryStringSupported","FileReader","readAsBinaryString","__webpack_public_path__","replace"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZ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MAAO,CAAEyG,KAAM3L,OAAMqK,aAAauC,EAAYrC,GAAOwC,SAAUA,IAG3DC,EAAgC3S,IACpC,MAAM4S,GAAS,IAAIC,WAAYC,gBAAgBzC,KAAKrQ,GAAO,mBACrD0S,EAAWrC,KAAKuC,EAAO5M,qBAAqB,oBAAoBxF,OAAS,EAAIoS,EAAO5M,qBAAqB,oBAAoB,GAAG+M,YAAc,IAC9I7C,EAAOG,KAAKuC,EAAO5M,qBAAqB,mBAAmB,GAAG+M,aAC9DR,EAAaK,EAAO5M,qBAAqB,QAAQ,GAAG+M,YAC1D,MAAO,CAAEzB,KAAM3L,OAAMqK,aAAauC,EAAYrC,GAAOwC,SAAUA,IAG3DM,EAAsBC,IAC1B,MAAMC,EAAcC,KACjB,0CACoBA,KAAKF,EAAKnC,4CACjBqC,KAAKF,EAAK7Q,KAAKgP,MAAM,KAAKgC,MAAMC,sDACxBF,KAAKF,EAAK7Q,yCACtB+Q,KAAKF,EAAKjT,+BACtB,OAAOkT,GAGHI,EAA8B,KACL,qBAAfC,YACyB,qBAAzBA,WAAW7S,WACiC,qBAA5C6S,WAAW7S,UAAU8S,mBAHD,GAMrB,QACbtE,0BACAS,oBACAK,eACAe,uBACAM,qBACAiB,uCACAK,+BACAW,8BACAN,qBACApD,sB,2CC3KA6D,KAA2B/P,OAAOuK,UAAY,IAAMhI,iBAAyByN,QAAQ,SAAUzN","file":"js/display.3dc2416c.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"display\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/areas/pseudocode-advertising/\";\n\n \tvar jsonpArray = window[\"pseudocode-advertising\"] = window[\"pseudocode-advertising\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.ready)?_c('div',[(_vm.showConfig)?_c('pre',[_vm._v(_vm._s(_vm.config.Settings))]):_vm._e()]):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\t\r\n\t\t
{{config.Settings}}
\r\n\t
\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./Display.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./Display.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Display.vue?vue&type=template&id=7ce6ae1b&scoped=true&\"\nimport script from \"./Display.vue?vue&type=script&lang=js&\"\nexport * from \"./Display.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Display.vue?vue&type=style&index=0&id=7ce6ae1b&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7ce6ae1b\",\n null\n \n)\n\nexport default component.exports","import './public-path'\r\nimport Vue from 'vue'\r\nimport Display from '../Display.vue'\r\nimport mtapi from '../mtapi'\r\n\r\nVue.config.productionTip = false\r\n\r\nmtapi.ready(() => {\r\n const iParts = Array.from(document.getElementsByTagName(process.env.VUE_APP_NAME)).map(x => x.id)\r\n iParts.forEach((id) => {\r\n const ContentKey = document.getElementById(id).attributes['x-content-key'].value\r\n const ContentItemKey = document.getElementById(id).attributes['x-content-item-key'].value\r\n new Vue({\r\n render: h => h(Display, {\r\n props: {\r\n ContentKey: ContentKey,\r\n ContentItemKey: ContentItemKey\r\n }\r\n })\r\n }).$mount(document.getElementById(id))\r\n })\r\n})\r\n","import mtapi from './core'\r\n\r\nclass CartManager {\r\n constructor () {\r\n this.current = null\r\n }\r\n\r\n async getCart (selectedPartyId = mtapi.clientContext.selectedPartyId, loggedInPartyId = mtapi.clientContext.loggedInPartyId) {\r\n try {\r\n this.current = null\r\n const response = await mtapi.axios.get(`/api/Cart?UserId=${selectedPartyId}&UpdatedBy=${loggedInPartyId}`)\r\n if (response.data.Count === 0) {\r\n const created = await this.createCart(selectedPartyId, loggedInPartyId)\r\n this.updateCartCount()\r\n return created\r\n } else {\r\n this.current = response.data.Items.$values[0]\r\n this.updateCartCount()\r\n return true\r\n }\r\n } catch (error) {\r\n this.current = null\r\n console.error('Error: could not get cart')\r\n return false\r\n }\r\n }\r\n\r\n async createCart (selectedPartyId = mtapi.clientContext.selectedPartyId, loggedInPartyId = mtapi.clientContext.loggedInPartyId) {\r\n try {\r\n this.current = null\r\n const currentDate = new Date()\r\n const cartData = {\r\n $type: 'Asi.Soa.Commerce.DataContracts.CartData, Asi.Contracts',\r\n UserId: selectedPartyId,\r\n ComboOrder: {\r\n $type: 'Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts',\r\n Order: {\r\n $type: 'Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts',\r\n BillToCustomerParty: {\r\n $type: 'Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts',\r\n PartyId: selectedPartyId\r\n },\r\n Delivery: {\r\n $type: 'Asi.Soa.Commerce.DataContracts.DeliveryDataCollection, Asi.Contracts',\r\n $values: [\r\n {\r\n $type: 'Asi.Soa.Commerce.DataContracts.DeliveryData, Asi.Contracts'\r\n }\r\n ]\r\n },\r\n Lines: {\r\n $type: 'Asi.Soa.Commerce.DataContracts.OrderLineDataCollection, Asi.Contracts',\r\n $values: []\r\n },\r\n SoldToCustomerParty: {\r\n $type: 'Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts',\r\n PartyId: selectedPartyId\r\n }\r\n }\r\n },\r\n UpdateInformation: {\r\n $type: 'Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts',\r\n CreatedBy: loggedInPartyId,\r\n CreatedOn: currentDate.toISOString().slice(0, -1),\r\n UpdatedBy: loggedInPartyId,\r\n UpdatedOn: currentDate.toISOString().slice(0, -1)\r\n }\r\n }\r\n const response = await mtapi.axios.post('/api/Cart', cartData)\r\n if (response.status === 201) {\r\n this.current = response.data\r\n return true\r\n } else {\r\n console.error('Error: could not create cart')\r\n return false\r\n }\r\n } catch (error) {\r\n this.current = null\r\n console.error('Error: could not create cart')\r\n return false\r\n }\r\n }\r\n\r\n async clearCart () {\r\n try {\r\n if (this.current) {\r\n const response = await mtapi.axios.delete(`/api/Cart/${this.current.CartId}`)\r\n this.current = null\r\n this.updateCartCount()\r\n return response.status === 200\r\n } else {\r\n this.current = null\r\n return true\r\n }\r\n } catch (error) {\r\n this.current = null\r\n console.error('Error: could not clear cart')\r\n return false\r\n }\r\n }\r\n\r\n async addProductToCart (productCode, quantity = 1) {\r\n try {\r\n if (this.current) {\r\n const lineIndex = this.productLineInCart(productCode)\r\n if (lineIndex > -1) {\r\n this.current.ComboOrder.Order.Lines.$values[lineIndex].QuantityOrdered.Amount += quantity\r\n } else {\r\n const lineData = {\r\n $type: 'Asi.Soa.Commerce.DataContracts.OrderLineData, Asi.Contracts',\r\n OrderLineId: mtapi.guid(),\r\n Item: {\r\n $type: 'Asi.Soa.Commerce.DataContracts.ItemSummaryData, Asi.Contracts',\r\n ItemId: productCode\r\n },\r\n LineNumber: 1,\r\n QuantityOrdered: {\r\n $type: 'System.Nullable`1[[Asi.Soa.Commerce.DataContracts.QuantityData, Asi.Contracts]], mscorlib',\r\n Amount: quantity\r\n },\r\n CanCombine: true\r\n }\r\n this.current.ComboOrder.Order.Lines.$values.push(lineData)\r\n }\r\n const response = await mtapi.axios.put(`/api/Cart/${this.current.CartId}`, this.current)\r\n this.current = response.data\r\n this.updateCartCount()\r\n return true\r\n } else {\r\n console.warn('Warning: cannot add product to cart, please load a cart first')\r\n return false\r\n }\r\n } catch (error) {\r\n this.current = null\r\n console.error('Error: could not add product to cart')\r\n return false\r\n }\r\n }\r\n\r\n productLineInCart (productCode) {\r\n if (this.current) {\r\n return this.current.ComboOrder.Order.Lines.$values.findIndex(x => x.Item.ItemId === productCode)\r\n } else {\r\n return -1\r\n }\r\n }\r\n\r\n productQuantityInCart (productCode) {\r\n if (this.current) {\r\n const lineIndex = this.productLineInCart(productCode)\r\n if (lineIndex > -1) {\r\n return this.current.ComboOrder.Order.Lines.$values[lineIndex].QuantityOrdered.Amount\r\n }\r\n }\r\n return 0\r\n }\r\n\r\n async removeProductFromCart (productCode, quantity = 1) {\r\n try {\r\n if (this.current) {\r\n const currentQuantity = this.productQuantityInCart(productCode)\r\n if (currentQuantity === 0) { return false }\r\n const lineIndex = this.productLineInCart(productCode)\r\n if (currentQuantity - quantity > 0) { this.current.ComboOrder.Order.Lines.$values[lineIndex].QuantityOrdered.Amount -= quantity } else { this.current.ComboOrder.Order.Lines.$values.splice(lineIndex, 1) }\r\n const response = await mtapi.axios.put(`/api/Cart/${this.current.CartId}`, this.current)\r\n this.current = response.data\r\n this.updateCartCount()\r\n return true\r\n } else {\r\n console.warn('Warning: cannot remove product from cart, please load a cart first')\r\n return false\r\n }\r\n } catch (error) {\r\n this.current = null\r\n console.error('Error: could not remove product from cart')\r\n return false\r\n }\r\n }\r\n\r\n updateCartCount () {\r\n if (typeof window.updateCartItemCount === 'function') { window.updateCartItemCount() }\r\n }\r\n}\r\n\r\nconst cart = new CartManager()\r\n\r\nexport default {\r\n cart\r\n}\r\n","/* eslint-disable no-prototype-builtins */\r\nclass ImisEntity {\r\n constructor (source) {\r\n Object.defineProperty(this, '_data', { enumerable: false, writable: true })\r\n this._data = typeof source === 'string' ? JSON.parse(source) : source\r\n if (typeof this._data === 'object') {\r\n if (this._data.$type === 'Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts') {\r\n // Generic entity data. Pivot and flatten properties.\r\n this._data.Properties.$values.forEach((property) => {\r\n Object.defineProperty(this, property.Name, {\r\n get () {\r\n if (typeof property.Value === 'object') { return property.Value.$value } else { return property.Value }\r\n },\r\n set (value) {\r\n if (typeof property.Value === 'object') { property.Value.$value = value } else { property.Value = value }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n })\r\n })\r\n } else {\r\n // Other entity types. Flatten collection $values to simple arrays.\r\n Object.getOwnPropertyNames(this._data).forEach((propertyName) => {\r\n if (this._data[propertyName] && typeof this._data[propertyName] === 'object') {\r\n if (this._data[propertyName].hasOwnProperty('$type') &&\r\n this._data[propertyName].hasOwnProperty('$values') &&\r\n Array.isArray(this._data[propertyName].$values) &&\r\n this._data[propertyName].$type.toLowerCase().includes('collection')) {\r\n const arr = this._data[propertyName].$values.map((item) => {\r\n if (item && typeof item === 'object') { return new ImisEntity(item) } else { return item }\r\n })\r\n Object.defineProperty(this, propertyName, {\r\n get () {\r\n return arr\r\n },\r\n set (value) {\r\n this._data[propertyName].$values = value\r\n },\r\n enumerable: true,\r\n configurable: true\r\n })\r\n } else {\r\n const obj = new ImisEntity(this._data[propertyName])\r\n Object.defineProperty(this, propertyName, {\r\n get () {\r\n return obj\r\n },\r\n set (value) {\r\n this._data[propertyName] = value\r\n },\r\n enumerable: true,\r\n configurable: true\r\n })\r\n }\r\n } else {\r\n if (propertyName.toLowerCase() !== '$type') {\r\n Object.defineProperty(this, propertyName, {\r\n get () {\r\n return this._data[propertyName]\r\n },\r\n set (value) {\r\n this._data[propertyName] = value\r\n },\r\n enumerable: true,\r\n configurable: true\r\n })\r\n }\r\n }\r\n })\r\n }\r\n }\r\n }\r\n\r\n getObject () {\r\n return this._data\r\n }\r\n\r\n getJSON () {\r\n return JSON.stringify(this._data)\r\n }\r\n}\r\n/* eslint-enable no-prototype-builtins */\r\n\r\nclass ImisEntityCollection {\r\n constructor (source) {\r\n Object.defineProperty(this, '_data', { enumerable: false, writable: true })\r\n this._data = typeof source === 'string' ? JSON.parse(source) : source\r\n if (typeof this._data === 'object' &&\r\n this._data.$type &&\r\n this._data.$type.startsWith('Asi.Soa.Core.DataContracts.PagedResult')\r\n ) {\r\n this.Offset = this._data.Offset\r\n this.Limit = this._data.Limit\r\n this.Count = this._data.Count\r\n this.TotalCount = this._data.TotalCount\r\n this.HasNext = this._data.HasNext\r\n this.NextOffset = this._data.NextOffset\r\n this.Entities = []\r\n this._data.Items.$values.forEach((entity) => {\r\n this.Entities.push(new ImisEntity(entity))\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport default {\r\n ImisEntity, ImisEntityCollection\r\n}\r\n","// import mtapi from './core'\r\n/*\r\nclass objectBrowserDialog {\r\n constructor () {\r\n this.options = {\r\n windowTitle: 'Document Browser',\r\n documentPath\r\n }\r\n }\r\n}\r\n*/\r\nconst openObjectBrowserDialog = (\r\n documentPath = '@/',\r\n rootFolder = '',\r\n typeFilter = '',\r\n windowTitle = 'Document Browser',\r\n multiSelect = false,\r\n publishedOnly = false,\r\n options = {\r\n showRecycleBin: false,\r\n hideAddress: false,\r\n showMenu: false,\r\n showMenuPublish: false,\r\n showMenuVersions: false,\r\n showMenuRun: false,\r\n showMenuPreview: false,\r\n hideMenuNew: false,\r\n hideMenuEdit: false,\r\n hideMenuOrganize: false\r\n }\r\n) => {\r\n console.log(options)\r\n}\r\n\r\nexport default {\r\n openObjectBrowserDialog\r\n}\r\n\r\n/*\r\n\r\n windowTitle: {type:String, default:'Document Browser'},\r\n documentPath: {type:String, default:'@/'},\r\n rootFolder: {type:String, default:''},\r\n typeFilter: {type: String, default:''},\r\n multiSelect: {type:Boolean, default: false},\r\n publishedOnly: {type:Boolean, default: false},\r\n showRecycleBin: {type:Boolean, default: false},\r\n hideAddress: {type:Boolean, default: false},\r\n showMenu: {type:Boolean, default: false},\r\n showMenuPublish: {type:Boolean, default: false},\r\n showMenuVersions: {type:Boolean, default: false},\r\n showMenuRun: {type:Boolean, default: false},\r\n showMenuPreview: {type:Boolean, default: false},\r\n hideMenuNew: {type:Boolean, default: false},\r\n hideMenuEdit: {type:Boolean, default: false},\r\n hideMenuOrganize: {type:Boolean, default: false}\r\n },\r\n data () {\r\n return {\r\n path: ''\r\n }\r\n },\r\n computed: {\r\n urlParams () {\r\n let urlParamString = `DocumentPath=${encodeURIComponent(this.documentPath)}`\r\n if (this.rootFolder !== '')\r\n urlParamString += `&iRootFolder=${encodeURIComponent(this.rootFolder)}`\r\n if (this.typeFilter !== '')\r\n urlParamString += `&TypeFilter=${encodeURIComponent(this.typeFilter.toUpperCase())}`\r\n urlParamString += `&ShowRecycleBin=${this.showRecycleBin}`\r\n if (this.hideAddress)\r\n urlParamString += `&ShowAddress=${!this.hideAddress}`\r\n if (this.showMenu)\r\n urlParamString += `&ShowMenu=${this.showMenu}`\r\n if (this.showMenu) {\r\n urlParamString += `&ShowMenuPublish=${this.showMenuPublish}`\r\n urlParamString += `&ShowMenuVersions=${this.showMenuVersions}`\r\n urlParamString += `&ShowMenuRun=${this.showMenuRun}`\r\n urlParamString += `&ShowMenuPreview=${this.showMenuPreview}`\r\n urlParamString += `&ShowMenuNew=${!this.hideMenuNew}`\r\n urlParamString += `&ShowMenuEdit=${!this.hideMenuEdit}`\r\n urlParamString += `&ShowMenuOrganize=${!this.hideMenuOrganize}`\r\n }\r\n return urlParamString\r\n*/\r\n","import core from './core'\r\nimport cart from './cart'\r\nimport docs from './document'\r\nimport entity from './entity'\r\nimport browser from './browser'\r\n\r\nexport default {\r\n ...core, ...cart, ...docs, ...entity, ...browser\r\n}\r\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./Display.vue?vue&type=style&index=0&id=7ce6ae1b&prod&scoped=true&lang=scss&\"","import axios from 'axios'\r\nimport Vue from 'vue'\r\nimport { v4 } from 'uuid'\r\n\r\n/* Setup global event bus. Exposed both through the ES6 module and the window global to allow\r\n event injection from external scripts and to share the same bus instance between different iParts\r\n Sometimes we need to get a unique ID for the DOM, particularly for matching labels to input elements\r\n so also creating a uid counter on the eventBus */\r\nwindow.$mtapi = window.$mtapi || {}\r\nwindow.$mtapi.eventBus = window.$mtapi.eventBus || new Vue({ data: { uid: 0 } })\r\nconst eventBus = window.$mtapi.eventBus\r\n\r\n// Client context - baseUrl, isAnonymous, loggedInPartyId, selectedPartyId, websiteRoot, virtualDir\r\nconst clientContext = JSON.parse(document.getElementById('__ClientContext').value)\r\n\r\n// Axios - set baseurl and add authorization header\r\naxios.defaults.baseURL = window.gWebRoot || ''\r\naxios.defaults.headers.common.RequestVerificationToken = document.getElementById('__RequestVerificationToken').value\r\naxios.defaults.withCredentials = true\r\n\r\n// Call callback after dom ready\r\nconst ready = (callback) => {\r\n if (document.readyState !== 'loading') {\r\n callback()\r\n } else if (document.addEventListener) {\r\n document.addEventListener('DOMContentLoaded', callback)\r\n } else {\r\n document.attachEvent('onreadystatechange', () => {\r\n if (document.readyState !== 'loading') { callback() }\r\n })\r\n }\r\n}\r\n\r\n// Get a unique id for html elements\r\nconst uid = () => {\r\n const result = 'uid-' + eventBus.uid\r\n eventBus.uid++\r\n return result\r\n}\r\n\r\n// Generate a GUID\r\nconst guid = () => {\r\n return v4()\r\n}\r\n\r\n// Check valid GUID\r\nconst isGuid = (value) => {\r\n return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(value)\r\n}\r\n\r\nconst delay = (ms) => new Promise(resolve => setTimeout(resolve, ms))\r\n\r\nexport default {\r\n eventBus, clientContext, axios, ready, uid, guid, isGuid, delay\r\n}\r\n","import mtapi from './'\r\n\r\nconst getDocumentByVersionKey = (documentVersionKey) => {\r\n return mtapi.axios.post('/api/Document/_execute', {\r\n $type: 'Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts',\r\n OperationName: 'FindByVersionId',\r\n EntityTypeName: 'Document',\r\n Parameters: {\r\n $type: 'System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib',\r\n $values: [\r\n {\r\n $type: 'System.String',\r\n $value: documentVersionKey\r\n }\r\n ]\r\n },\r\n ParameterTypeName: {\r\n $type: 'System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib',\r\n $values: [\r\n 'System.String'\r\n ]\r\n },\r\n UseJson: false\r\n }).then(response => {\r\n if (response.data.$type.startsWith('Asi.Soa.Core.DataContracts.ServiceResponse') && response.data.Result.$type === 'Asi.Soa.Core.DataContracts.DocumentData, Asi.Contracts') {\r\n return response.data.Result\r\n } else {\r\n return response.data\r\n }\r\n })\r\n}\r\n\r\nconst getDocumentByPath = (documentPath) => {\r\n return mtapi.axios.post('/api/Document/_execute', {\r\n $type: 'Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts',\r\n OperationName: 'FindByPath',\r\n EntityTypeName: 'Document',\r\n Parameters: {\r\n $type: 'System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib',\r\n $values: [\r\n {\r\n $type: 'System.String',\r\n $value: documentPath\r\n }\r\n ]\r\n },\r\n ParameterTypeName: {\r\n $type: 'System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib',\r\n $values: [\r\n 'System.String'\r\n ]\r\n },\r\n UseJson: false\r\n }).then(response => {\r\n if (response.data.$type.startsWith('Asi.Soa.Core.DataContracts.ServiceResponse') && response.data.Result.$type === 'Asi.Soa.Core.DataContracts.DocumentData, Asi.Contracts') {\r\n return response.data.Result\r\n } else {\r\n return response.data\r\n }\r\n })\r\n}\r\n\r\nconst getIqaDefinition = (documentPathOrVersionKey) => {\r\n return mtapi.axios.post('/api/QueryDefinition/_execute', {\r\n $type: 'Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts',\r\n OperationName: mtapi.isGuid(documentPathOrVersionKey) ? 'FindById' : 'FindByPath',\r\n EntityTypeName: 'QueryDefinition',\r\n Parameters: {\r\n $type: 'System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib',\r\n $values: [\r\n {\r\n $type: 'System.String',\r\n $value: documentPathOrVersionKey\r\n }\r\n ]\r\n },\r\n ParameterTypeName: {\r\n $type: 'System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib',\r\n $values: [\r\n System.String // eslint-disable-line\r\n ]\r\n },\r\n UseJson: false\r\n }).then(response => {\r\n if (response.data.$type.startsWith('Asi.Soa.Core.DataContracts.ServiceResponse') && response.data.Result.$type === 'Asi.Soa.Core.DataContracts.DocumentData, Asi.Contracts') {\r\n return response.data.Result\r\n } else {\r\n return response.data\r\n }\r\n })\r\n}\r\n\r\nconst base64ToBlob = (base64, mime) => {\r\n mime = mime || ''\r\n var sliceSize = 1024\r\n var byteChars = atob(base64)\r\n var byteArrays = []\r\n for (var offset = 0, len = byteChars.length; offset < len; offset += sliceSize) {\r\n var slice = byteChars.slice(offset, offset + sliceSize)\r\n var byteNumbers = new Array(slice.length)\r\n for (var i = 0; i < slice.length; i++) {\r\n byteNumbers[i] = slice.charCodeAt(i)\r\n }\r\n var byteArray = new Uint8Array(byteNumbers)\r\n byteArrays.push(byteArray)\r\n }\r\n return new Blob(byteArrays, { type: mime })\r\n}\r\n\r\nconst documentTypeIdToMime = async (documentTypeId) => {\r\n const response = await mtapi.axios.get(`/api/FileTypeRef/${documentTypeId}`)\r\n const fileType = new mtapi.ImisEntity(response.data)\r\n return fileType.MimeType.split(',')[0]\r\n}\r\n\r\nconst downloadBlobAsFile = (blob, filename) => {\r\n if (navigator.msSaveBlob) {\r\n navigator.msSaveOrOpenBlob(blob, filename)\r\n } else {\r\n var element = document.createElement('a')\r\n element.setAttribute('href', URL.createObjectURL(blob))\r\n element.setAttribute('download', filename)\r\n element.style.display = 'none'\r\n document.body.appendChild(element)\r\n element.click()\r\n document.body.removeChild(element)\r\n }\r\n}\r\n\r\nconst getBlobAndFileNameFromDocumentSystem = async (documentPathOrVersionKey) => {\r\n let response\r\n if (mtapi.isGuid(documentPathOrVersionKey)) { response = await mtapi.getDocumentByVersionKey(documentPathOrVersionKey) } else { response = await mtapi.getDocumentByPath(documentPathOrVersionKey) }\r\n const base64Data = response.Data.$value\r\n const mime = await mtapi.documentTypeIdToMime(response.DocumentTypeId)\r\n const fileName = response.Name\r\n return { blob: mtapi.base64ToBlob(base64Data, mime), fileName: fileName }\r\n}\r\n\r\nconst getBlobAndFileNameFromUDFile = (data) => {\r\n const xmlDoc = new DOMParser().parseFromString(atob(data), 'application/xml')\r\n const fileName = atob(xmlDoc.getElementsByTagName('UploadedFileName').length > 0 ? xmlDoc.getElementsByTagName('UploadedFileName')[0].textContent : '')\r\n const mime = atob(xmlDoc.getElementsByTagName('FileContentType')[0].textContent)\r\n const base64Data = xmlDoc.getElementsByTagName('File')[0].textContent\r\n return { blob: mtapi.base64ToBlob(base64Data, mime), fileName: fileName }\r\n}\r\n\r\nconst fileUploadToUDFile = (file) => {\r\n const encodedFile = btoa(\r\n `\r\n ${btoa(file.type)}\r\n ${btoa(file.name.split('.').pop().toUpperCase())}\r\n ${btoa(file.name)}\r\n ${btoa(file.data)}`)\r\n return encodedFile\r\n}\r\n\r\nconst readAsBinaryStringSupported = (() => {\r\n return typeof FileReader !== 'undefined' &&\r\n typeof FileReader.prototype !== 'undefined' &&\r\n typeof FileReader.prototype.readAsBinaryString !== 'undefined'\r\n})()\r\n\r\nexport default {\r\n getDocumentByVersionKey,\r\n getDocumentByPath,\r\n base64ToBlob,\r\n documentTypeIdToMime,\r\n downloadBlobAsFile,\r\n getBlobAndFileNameFromDocumentSystem,\r\n getBlobAndFileNameFromUDFile,\r\n readAsBinaryStringSupported,\r\n fileUploadToUDFile,\r\n getIqaDefinition\r\n}\r\n","if (process.env.NODE_ENV === 'production') {\r\n __webpack_public_path__ = (window.gWebRoot || '') + process.env.VUE_APP_PATH.replace('[name]', process.env.VUE_APP_NAME) // eslint-disable-line\r\n}\r\n"],"sourceRoot":""}