blob: 7e4a4313a2d7c45bc151438577f3f82e788eeaca [file] [log] [blame]
MainJs={initializeMappings:function(){function e(e,n,t,r){var o=JSON.parse(JSON.stringify(DMN12)),a=JSON.parse(JSON.stringify(DMNDI12));return o.name="DMN"+e,o.defaultElementNamespaceURI=n,o.dependencies=["DMNDI"+e],(o.typeInfos||[]).map((function(n){(n.propertyInfos||[]).map((function(n){"dmndi"===n.name&&(n.elementName.namespaceURI=t,n.typeInfo="DMNDI"+e+".DMNDI")}))})),a.name="DMNDI"+e,a.defaultElementNamespaceURI=t,(a.elementInfos||[]).map((function(e){"DMNStyle"===e.elementName&&(e.substitutionHead.namespaceURI=r)})),[o,a]}var n=e("10","http://www.omg.org/spec/DMN/20130901","http://www.omg.org/spec/DMN/20130901/DMNDI/","http://www.omg.org/spec/DMN/20130901/DI/"),t=e("11","http://www.omg.org/spec/DMN/20151101/dmn.xsd","http://www.omg.org/spec/DMN/20151101/DMNDI/","http://www.omg.org/spec/DMN/20151101/DI/"),r=e("13","https://www.omg.org/spec/DMN/20191111/MODEL/","https://www.omg.org/spec/DMN/20191111/DMNDI/","https://www.omg.org/spec/DMN/20191111/DI/");return[].concat.apply([DC,DI,DMNDI12,DMN12,KIE],[n,t,r])},_mappings:[],mappings:function(){return 0===this._mappings.length&&(this._mappings=this.initializeMappings()),this._mappings},isJsInteropConstructorsInitialized:!1,initializeJsInteropConstructors:function(e){if(!this.isJsInteropConstructorsInitialized){for(var n in this.isJsInteropConstructorsInitialized=!0,e)e.hasOwnProperty(n)&&function(e){var n=e.filter(s),t=e.filter(a);n.forEach(o),t.forEach(o)}(e[n]);console.log("JsInterop constructors successfully generated.")}function t(e){return new Function('return { "TYPE_NAME" : "'+e+'" }')}function r(){return new Function("return { }")}function o(e){var n=JSON.parse(e),o=n.name,a=n.nameSpace,s=n.typeName;null!=a?window[a][o]=null!=s?t(s):r():window[o]=null!=s?t(s):r()}function a(e){return null!=JSON.parse(e).nameSpace}function s(e){return null==JSON.parse(e).nameSpace}},unmarshall:function(e,n,t){function r(){return void 0===s&&(s=p.value.otherAttributes),s}function o(e,n){"TYPE_NAME"===n&&(e[n]=e[n].replace(/DMN(10|11|13)/,"DMN12").replace(/DMNDI(10|11|13)/,"DMNDI12")),"typeRef"===n&&(void 0===i&&(i=Object.keys(r())),i).forEach((function(t){e[n]=e[n].replace(new RegExp("^"+t.split("}")[1]+":"),"")}))}function a(e,n){"string"==typeof e[n]&&(e[n]=e[n].replace("http://www.omg.org/spec/DMN/20151101/dmn.xsd","http://www.omg.org/spec/DMN/20180521/MODEL/").replace(/(http|https):\/\/www\.omg\.org\/spec\/DMN\/(20130901|20151101|20191111)/,"http://www.omg.org/spec/DMN/20180521"))}var s,i,p=new Jsonix.Context(this.mappings()).createUnmarshaller().unmarshalString(e);p.name.namespaceURI.match(new RegExp("http://www\\.omg\\.org/spec/DMN/20180521/MODEL/","g"))||(function e(n){for(var t in n)n.hasOwnProperty(t)&&(null!==n[t]&&"object"==typeof n[t]?e(n[t]):(o(n,t),a(n,t)))}(p),function(){var e=r(),n=e.namespace;for(var t in e)e.hasOwnProperty(t)&&n!==t&&e[t]===n&&delete e[t]}()),t(p)},marshall:function(e,n,t){var r=new Jsonix.Context(this.mappings(),{namespacePrefixes:n}).createMarshaller().marshalDocument(e);"undefined"!=typeof FormatterJs?t(FormatterJs.format(r)):t((new XMLSerializer).serializeToString(r))}};