Lekcja 08 projekt auta cz1
This commit is contained in:
1 parent
8fc98ebf9d
commit
d60f8a91a7
1543 files changed
+255781
No files matched your search
+10164
File diff suppressed because it is too large.
Load diff
+2
@@ -0,0 +1,2 @@
|
||||
/*! For license information please see nedb.min.js.LICENSE.txt */
|
||||
(()=>{var e={100:e=>{e.exports={}},159:e=>{e.exports.uid=e=>(e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=e.length%3;let n,o="";for(let a=0,s=e.length-r;a<s;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o+=t[(i=n)>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i];var i;return 1===r?(n=e[e.length-1],o+=t[n>>2],o+=t[n<<4&63],o+="=="):2===r&&(n=(e[e.length-2]<<8)+e[e.length-1],o+=t[n>>10],o+=t[n>>4&63],o+=t[n<<2&63],o+="="),o})((e=>{const t=new Array(e);for(let r,n=0;n<e;n++)0==(3&n)&&(r=4294967296*Math.random()),t[n]=r>>>((3&n)<<3)&255;return t})(Math.ceil(Math.max(8,2*e)))).replace(/[+/]/g,"").slice(0,e)},909:(e,t,r)=>{const n=r(483).createInstance({name:"NeDB",storeName:"nedbdata"}),o=async(e,t,r)=>{try{await n.setItem(e,t)}catch(e){console.warn("NeDB - storage.browser - writeFileAsync:",e),console.warn("An error happened while writing, skip")}};e.exports.existsAsync=async e=>{try{return null!==await n.getItem(e)}catch(e){return console.warn("NeDB - storage.browser - existsAsync:",e),!1}},e.exports.renameAsync=async(e,t)=>{try{const r=await n.getItem(e);null===r?await n.removeItem(t):(await n.setItem(t,r),await n.removeItem(e))}catch(e){console.warn("NeDB - storage.browser - renameAsync:",e),console.warn("An error happened while renaming, skip")}},e.exports.writeFileAsync=o,e.exports.crashSafeWriteFileLinesAsync=async(e,t)=>{t.push(""),await o(e,t.join("\n"))},e.exports.appendFileAsync=async(e,t,r)=>{try{const r=await n.getItem(e)||"";await n.setItem(e,r+t)}catch(e){console.warn("NeDB - storage.browser - appendFileAsync:",e),console.warn("An error happened appending to file writing, skip")}},e.exports.readFileAsync=async(e,t)=>{try{return await n.getItem(e)||""}catch(e){return console.warn("NeDB - storage.browser - readFileAsync:",e),console.warn("An error happened while reading, skip"),""}},e.exports.unlinkAsync=async e=>{try{await n.removeItem(e)}catch(e){console.warn("NeDB - storage.browser - unlinkAsync:",e),console.warn("An error happened while unlinking, skip")}},e.exports.mkdirAsync=(e,t)=>Promise.resolve(),e.exports.ensureDatafileIntegrityAsync=e=>Promise.resolve(),e.exports.ensureParentDirectoryExistsAsync=async(e,t)=>Promise.resolve()},578:(e,t,r)=>{const n=r(118),{callbackify:o}=r(539);e.exports=class{constructor(e,t,r){this.db=e,this.query=t||{},r&&(this.mapFn=r),this._limit=void 0,this._skip=void 0,this._sort=void 0,this._projection=void 0}limit(e){return this._limit=e,this}skip(e){return this._skip=e,this}sort(e){return this._sort=e,this}projection(e){return this._projection=e,this}_project(e){const t=[];let r;if(void 0===this._projection||0===Object.keys(this._projection).length)return e;const o=0!==this._projection._id,{_id:i,...a}=this._projection;this._projection=a;const s=Object.keys(this._projection);return s.forEach((e=>{if(void 0!==r&&this._projection[e]!==r)throw new Error("Can't both keep and omit fields except for _id");r=this._projection[e]})),e.forEach((e=>{let i;1===r?(i={$set:{}},s.forEach((t=>{i.$set[t]=n.getDotValue(e,t),void 0===i.$set[t]&&delete i.$set[t]})),i=n.modify({},i)):(i={$unset:{}},s.forEach((e=>{i.$unset[e]=!0})),i=n.modify(e,i)),o?i._id=e._id:delete i._id,t.push(i)})),t}async _execAsync(){let e=[],t=0,r=0;const o=await this.db._getCandidatesAsync(this.query);for(const i of o)if(n.match(i,this.query))if(this._sort)e.push(i);else if(this._skip&&this._skip>r)r+=1;else if(e.push(i),t+=1,this._limit&&this._limit<=t)break;if(this._sort){const t=Object.entries(this._sort).map((([e,t])=>({key:e,direction:t})));e.sort(((e,r)=>{for(const o of t){const t=o.direction*n.compareThings(n.getDotValue(e,o.key),n.getDotValue(r,o.key),this.db.compareStrings);if(0!==t)return t}return 0}));const r=this._limit||e.length,o=this._skip||0;e=e.slice(o,o+r)}return e=this._project(e),this.mapFn?this.mapFn(e):e}exec(e){o((()=>this.execAsync()))(e)}execAsync(){return this.db.executor.pushAsync((()=>this._execAsync()))}then(e,t){return this.execAsync().then(e,t)}catch(e){return this.execAsync().catch(e)}finally(e){return this.execAsync().finally(e)}}},797:(e,t,r)=>{const{EventEmitter:n}=r(187),{callbackify:o,deprecate:i}=r(539),a=r(578),s=r(159),c=r(196),u=r(98),f=r(118),l=r(328),{isDate:h,pick:p,filterIndexNames:y}=r(988);e.exports=class extends n{constructor(e){let t;super(),"string"==typeof e?i((()=>{t=e,this.inMemoryOnly=!1}),"@seald-io/nedb: Giving a string to the Datastore constructor is deprecated and will be removed in the next major version. Please use an options object with an argument 'filename'.")():(t=(e=e||{}).filename,this.inMemoryOnly=e.inMemoryOnly||!1,this.autoload=e.autoload||!1,this.timestampData=e.timestampData||!1),t&&"string"==typeof t&&0!==t.length?this.filename=t:(this.filename=null,this.inMemoryOnly=!0),this.compareStrings=e.compareStrings,this.persistence=new l({db:this,afterSerialization:e.afterSerialization,beforeDeserialization:e.beforeDeserialization,corruptAlertThreshold:e.corruptAlertThreshold,modes:e.modes,testSerializationHooks:e.testSerializaLine truncated
|
||||
+2472
File diff suppressed because it is too large.
Load diff
+1
@@ -0,0 +1 @@
|
||||
(()=>{var t={924:(t,r,e)=>{"use strict";var n=e(210),o=e(559),i=o(n("String.prototype.indexOf"));t.exports=function(t,r){var e=n(t,!!r);return"function"==typeof e&&i(t,".prototype.")>-1?o(e):e}},559:(t,r,e)=>{"use strict";var n=e(612),o=e(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),p=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(p)try{p({},"a",{value:1})}catch(t){p=null}t.exports=function(t){var r=u(n,a,arguments);return c&&p&&c(r,"length").configurable&&p(r,"length",{value:1+f(0,t.length-(arguments.length-1))}),r};var y=function(){return u(n,i,arguments)};p?p(t.exports,"apply",{value:y}):t.exports.apply=y},29:(t,r,e)=>{"use strict";var n=e(320),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(t,r,e){for(var n=0,o=t.length;n<o;n++)i.call(t,n)&&(null==e?r(t[n],n,t):r.call(e,t[n],n,t))},u=function(t,r,e){for(var n=0,o=t.length;n<o;n++)null==e?r(t.charAt(n),n,t):r.call(e,t.charAt(n),n,t)},c=function(t,r,e){for(var n in t)i.call(t,n)&&(null==e?r(t[n],n,t):r.call(e,t[n],n,t))};t.exports=function(t,r,e){if(!n(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=e),"[object Array]"===o.call(t)?a(t,r,i):"string"==typeof t?u(t,r,i):c(t,r,i)}},648:t=>{"use strict";var r="Function.prototype.bind called on incompatible ",e=Array.prototype.slice,n=Object.prototype.toString,o="[object Function]";t.exports=function(t){var i=this;if("function"!=typeof i||n.call(i)!==o)throw new TypeError(r+i);for(var a,u=e.call(arguments,1),c=Math.max(0,i.length-u.length),p=[],f=0;f<c;f++)p.push("$"+f);if(a=Function("binder","return function ("+p.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof a){var r=i.apply(this,u.concat(e.call(arguments)));return Object(r)===r?r:this}return i.apply(t,u.concat(e.call(arguments)))})),i.prototype){var y=function(){};y.prototype=i.prototype,a.prototype=new y,y.prototype=null}return a}},612:(t,r,e)=>{"use strict";var n=e(648);t.exports=Function.prototype.bind||n},210:(t,r,e)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,u=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(t){c=null}var p=function(){throw new a},f=c?function(){try{return p}catch(t){try{return c(arguments,"callee").get}catch(t){return p}}}():p,y=e(405)(),l=Object.getPrototypeOf||function(t){return t.__proto__},s={},g="undefined"==typeof Uint8Array?n:l(Uint8Array),d={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":y?l([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":s,"%AsyncGenerator%":s,"%AsyncGeneratorFunction%":s,"%AsyncIteratorPrototype%":s,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":s,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y?l(l([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y?l((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y?l((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y?l(""[Symbol.iterator]()):n,"%Symbol%":y?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":f,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16ArraLine truncated
|
||||
Reference in new issue
Block a user