<commit_before>define("schematic/Logger",[],function(){return function(e,t,n){var r={TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5},i,s=[];e=r[e.toUpperCase()],t||(t=console),typeof n=="undefined"&&(n=""),i=function(e,r,i,o,u){var a=t[e]||t.info;r=n+r;if(o)i?a.call(t,r+" --> "+JSON.stringify(i)):a.call(t,r);else try{u[0]&&(u[0]=n+u[0]),a.apply(t,u)}catch(f){a(r,i,o,u)}s.forEach(function(t){t.log(e,r,i,o)})},this.addPlugin=function(e){s.push(e)},this.trace=function(t,n,s){e<=r.TRACE&&i("debug",t,n,s,arguments)},this.debug=function(t,n,s){e<=r.DEBUG&&i("debug",t,n,s,arguments)},this.info=function(t,n,s){e<=r.INFO&&i("info",t,n,s,arguments)},this.warn=function(t,n,s){e<=r.WARN&&i("warn",t,n,s,arguments)},this.error=function(t,n,s){e<=r.ERROR&&i("error",t,n,s,arguments)},this.time=function(e){t.time.apply(t,arguments)},this.timeEnd=function(e){t.timeEnd.apply(t,arguments)}}}),define("schematic/SchemaResolver",[],function(){return function(){this.resolveRefs=function(e,t,n){(!e.tag||!e.tag.resolved)&&Object.keys(e).forEach(function(e,r,i){r==="$ref"?(require([e],function(t){e=t}),e&&!e.resolved&&(e.resolved=!0,this.resolveRefs(e,i,r)),t[n]=e):typeof e=="object"&&this.resolveRefs(e,i,r)},this)}}}),define("schematic/Validator",[],function(){return function(e,t,n){return}}),define("schematic/BackboneExtension",["./Validator"],function(e){var t;return typeof Backbone!="undefined"&&(Backbone.SchematicModel=Backbone.Model.extend({initialize:function(e,t){var n=this,r=this.jsonschema=t&&t.schema;Object.keys(r&&r.properties).forEach(function(e,t,r){Object.defineProperty(n,e,{get:function(){return n.get(e)},set:function(t){return n.set(e,t,{validate:!0})},enumerable:!0})})},validate:function(t,n){var r=new Backbone.Model(this.toJSON());return r.set(t),e(this.jsonschema,r.toJSON(),t)}}),t=Backbone.SchematicModel),t}),define("schematic/ModelFactory",["./Logger","./SchemaResolver","./BackboneExtension"],function(e,t,n){var r=new e("debug");return function(e){var i=this,s=function(e,t){var n=t,s=t||{},o=this,u,a,f,l=function(t,n){var i=!1;if(e.properties[t])r.debug("schema: "+e.id+" contains property: "+t),i=!0;else{r.debug("schema: "+e.id+" does not contain property: "+t);if(!n)throw new Error(t+" not defined in  "+e.id)}return i},c=function(t,n,i){var s=e.properties[t],o=!1;r.debug("Checking if property: "+t+" is valid to set");if(l(t,i))if(n.schemaId)r.debug("The value has a defined schema ID: "+n.schemaId),o=n.schemaId===s.schemaId;else if(typeof n===s.type)r.debug("The value matches property type: "+s.type),o=!0;else if(typeof n=="object")r.debug("Value is an object, checking if type is array..."),o=n.length&&s.type==="array";else if(typeof n=="number"&&n%1===0)r.debug("Value is an integer, checking if property type is integer.."),o=s.type==="integer";else if(!i)throw new Error("Expected '"+(s.schemaId||s.type)+"' but received '"+(n.schemaId||typeof n)+"' for ModelObject '"+e.id+"'");return o};return this.schemaId=e.id,this.get=function(t){var r,o=e.properties[t];if(l(t))return o.type==="array"&&n?(r=[],s[t].forEach(function(e,t){e&&r.push(i.getModel(o.items,e))},this)):s[t]&&(r=n&&o.type==="object"?i.getModel(o,s[t]):s[t]),r},this.set=function(e,t){if(c(e,t))return s[e]=t,!0},this.getRaw=function(){return s},this.initialize=function(e){Object.keys(e).forEach(function(t,n,s){var u;e[t]&&(e[t].schemaId?(r.debug("Getting and initializing model with schema ID: "+e[t].schemaId),u=i.getModel(e[t].schemaId),u.initialize(e[t]),o.set(t,u)):c(t,e[t],!0)&&o.set(t,JSON.parse(JSON.stringify(e[t]))))})},Object.keys(e.properties).forEach(function(e,t,n){Object.defineProperty(o,e,{get:function(){return o.get(e)},set:function(t){return o.set(e,t)},enumerable:!0})}),Object.freeze(this)};this.config=e||{resolver:function(e){var t;return require([e],function(e){e&&(typeof e=="function"?t=new e:t=e)}),t}},this.resolvers=[this.config.resolver],this.addResolver=function(e){this.resolvers.push(e)},this.getModelBySchema=function(e,t){var i;return r.debug("Getting new model with schema ID: "+e.id),n?i=new n(t,{validate:!0,schema:e}):i=new s(e,t),i},this.getModel=function(e,t){var n;return typeof e=="string"?n=this.getModelByName(e,t):n=this.getModelBySchema(e,t),n},this.getSchema=function(e){var n,r=new t;return this.resolvers.some(function(t){return n=t(e),n}),r.resolveRefs(n,null,null),n},this.getModelByName=function(e,t){var n=this.getSchema(e);return r.debug("Getting new model by name: "+e+" using schema: "+n),this.getModelBySchema(n,t)},this.getModelInitialized=function(e,t){var n;return e.schemaId?n=this.getModel(e.schemaId):n=this.getModel(t),r.debug("Initializing new model with schema ID: "+n.schemaId),n.initialize(e),n}}});<commit_msg>Generate new minified version.<commit_after>define("schematic/Logger",[],function(){return function(e,t,n){var r={TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5},i,s=[];e=r[e.toUpperCase()],t||(t=console),typeof n=="undefined"&&(n=""),i=function(e,r,i,o,u){var a=t[e]||t.info;r=n+r;if(o)i?a.call(t,r+" --> "+JSON.stringify(i)):a.call(t,r);else try{u[0]&&(u[0]=n+u[0]),a.apply(t,u)}catch(f){a(r,i,o,u)}s.forEach(function(t){t.log(e,r,i,o)})},this.addPlugin=function(e){s.push(e)},this.trace=function(t,n,s){e<=r.TRACE&&i("debug",t,n,s,arguments)},this.debug=function(t,n,s){e<=r.DEBUG&&i("debug",t,n,s,arguments)},this.info=function(t,n,s){e<=r.INFO&&i("info",t,n,s,arguments)},this.warn=function(t,n,s){e<=r.WARN&&i("warn",t,n,s,arguments)},this.error=function(t,n,s){e<=r.ERROR&&i("error",t,n,s,arguments)},this.time=function(e){t.time.apply(t,arguments)},this.timeEnd=function(e){t.timeEnd.apply(t,arguments)}}}),define("schematic/SchemaResolver",[],function(){return function(e){this.resolveRefs=function(t,n,r){(!t.tag||!t.tag.resolved)&&Object.keys(t).forEach(function(i,s,o){var u=t[i],a;i==="$ref"?(e.some(function(e){return a=e(u),a}),a&&a.tag&&!a.tag.resolved&&(a.resolved=!0,this.resolveRefs(a,t,i)),n[r]=a):typeof u=="object"&&this.resolveRefs(u,t,i)},this)}}}),define("schematic/Validator",[],function(){return function(e,t,n){return}}),define("schematic/BackboneExtension",["./Validator"],function(e){var t;return typeof Backbone!="undefined"&&(Backbone.SchematicModel=Backbone.Model.extend({initialize:function(e,t){var n=this,r=this.jsonschema=t&&t.schema;Object.keys(r&&r.properties).forEach(function(e,t,r){Object.defineProperty(n,e,{get:function(){return n.get(e)},set:function(t){return n.set(e,t,{validate:!0})},enumerable:!0})})},validate:function(t,n){var r=new Backbone.Model(this.toJSON());return r.set(t),e(this.jsonschema,r.toJSON(),t)}}),t=Backbone.SchematicModel),t}),define("schematic/ModelFactory",["./Logger","./SchemaResolver","./BackboneExtension"],function(e,t,n){var r=new e("debug");return function(e){var i=this,s=function(e,t){var n=t,s=t||{},o=this,u,a,f,l=function(t,n){var i=!1;if(e.properties[t])r.debug("schema: "+e.id+" contains property: "+t),i=!0;else{r.debug("schema: "+e.id+" does not contain property: "+t);if(!n)throw new Error(t+" not defined in  "+e.id)}return i},c=function(t,n,i){var s=e.properties[t],o=!1;r.debug("Checking if property: "+t+" is valid to set");if(l(t,i))if(n.schemaId)r.debug("The value has a defined schema ID: "+n.schemaId),o=n.schemaId===s.schemaId;else if(typeof n===s.type)r.debug("The value matches property type: "+s.type),o=!0;else if(typeof n=="object")r.debug("Value is an object, checking if type is array..."),o=n.length&&s.type==="array";else if(typeof n=="number"&&n%1===0)r.debug("Value is an integer, checking if property type is integer.."),o=s.type==="integer";else if(!i)throw new Error("Expected '"+(s.schemaId||s.type)+"' but received '"+(n.schemaId||typeof n)+"' for ModelObject '"+e.id+"'");return o};return this.schemaId=e.id,this.get=function(t){var r,o=e.properties[t];if(l(t))return o.type==="array"&&n?(r=[],s[t].forEach(function(e,t){e&&r.push(i.getModel(o.items,e))},this)):s[t]&&(r=n&&o.type==="object"?i.getModel(o,s[t]):s[t]),r},this.set=function(e,t){if(c(e,t))return s[e]=t,!0},this.getRaw=function(){return s},this.initialize=function(e){Object.keys(e).forEach(function(t,n,s){var u;e[t]&&(e[t].schemaId?(r.debug("Getting and initializing model with schema ID: "+e[t].schemaId),u=i.getModel(e[t].schemaId),u.initialize(e[t]),o.set(t,u)):c(t,e[t],!0)&&o.set(t,JSON.parse(JSON.stringify(e[t]))))})},Object.keys(e.properties).forEach(function(e,t,n){Object.defineProperty(o,e,{get:function(){return o.get(e)},set:function(t){return o.set(e,t)},enumerable:!0})}),Object.freeze(this)};this.config=e||{resolver:function(e){var t;return require([e],function(e){e&&(typeof e=="function"?t=new e:t=e)}),t}},this.resolvers=[this.config.resolver],this.addResolver=function(e){this.resolvers.push(e)},this.getModelBySchema=function(e,t){var i;return r.debug("Getting new model with schema ID: "+e.id),typeof n=="function"?i=new n(t,{validate:!0,schema:e}):i=new s(e,t),i},this.getModel=function(e,t){var n;return typeof e=="string"?n=this.getModelByName(e,t):n=this.getModelBySchema(e,t),n},this.getSchema=function(e){var n,r=new t(this.resolvers);return this.resolvers.some(function(t){return n=t(e),n}),r.resolveRefs(n,null,null),n},this.getModelByName=function(e,t){var n=this.getSchema(e);return r.debug("Getting new model by name: "+e+" using schema: "+n),this.getModelBySchema(n,t)},this.getModelInitialized=function(e,t){var n;return e.schemaId?n=this.getModel(e.schemaId):n=this.getModel(t),r.debug("Initializing new model with schema ID: "+n.schemaId),n.initialize(e),n}}});
{'fraction_non_alphanumeric': 0.27093908629441626, 'fraction_numerical': 0.004441624365482234, 'mean_word_length': 13.869496855345911, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5358705', 'n_tokens_mistral': 3825, 'n_tokens_neox': 3822, 'n_words': 307}