diff --git a/4/bundle.10692b0fccb036138080.js b/4/bundle.10692b0fccb036138080.js new file mode 100644 index 0000000..70df744 --- /dev/null +++ b/4/bundle.10692b0fccb036138080.js @@ -0,0 +1,2 @@ +(()=>{var e={484:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",r="day",l="week",o="month",c="quarter",p="year",v="date",d="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},h=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},m={s:h,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),s=n%60;return(t<=0?"+":"-")+h(i,2,"0")+":"+h(s,2,"0")},m:function e(t,n){if(t.date()1)return e(r[0])}else{var l=t.name;b[l]=t,s=l}return!i&&s&&(y=s),s||!i&&y},M=function(e,t){if($(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new x(n)},k=m;k.l=w,k.i=$,k.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function f(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[g]=!0}var h=f.prototype;return h.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(u);if(i){var s=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],s,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],s,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(t)}(e),this.init()},h.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},h.$utils=function(){return k},h.isValid=function(){return!(this.$d.toString()===d)},h.isSame=function(e,t){var n=M(e);return this.startOf(t)<=n&&n<=this.endOf(t)},h.isAfter=function(e,t){return M(e){var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e){const t=document.createElement("div");return t.innerHTML=e,t.firstElementChild}function t(e,t,n="beforeend"){t.insertAdjacentElement(n,e.getElement())}class i{getTemplate(){return'\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n '}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}class s{getTemplate(){return'\n
\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n
\n'}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}class a{getTemplate(){return''}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}var r=n(484),l=n.n(r);function o(e){return e?l()(e).format("HH:mm"):""}class c{constructor(e,t,n){this.events=e,this.destinations=t,this.offers=n}getTemplate(){return function(e,t,n){const i=e[0],s=i.id,a=t.find((e=>e.id===i.destination)),r=n.find((e=>e.type===i.type)).offers,l=r.filter((e=>i.offers.includes(e.id))),{basePrice:c,dateFrom:p,dateTo:v,type:d}=i,{name:u,description:_,pictures:f}=a;return`\n
  • \n
    \n
    \n
    \n \n \n\n
    \n
    \n Event type\n ${function(e,t,n){e.map((i=>{return`
    \n \n \n
    `;var s})).join("")}(e.map((e=>e.type)),s,d)}\n
    \n
    \n
    \n\n
    \n \n \n \n ${function(e){e.map((e=>``)).join("")}(t)}\n \n
    \n\n
    \n \n \n —\n \n \n
    \n\n
    \n \n \n
    \n\n \n \n ${i.id?'':""}\n
    \n\n
    \n ${r.length>0?`
    \n

    Offers

    \n
    \n ${function(e,t,n){return n.map((n=>`
    \n e.id===n.id))?"checked":""}>\n \n
    `)).join("")}(l,s,r)}\n
    \n
    `:""}\n ${a?`
    \n

    Destination

    \n

    ${_}

    \n ${function(e){return 0===e.length?"":`\n
    \n
    \n ${e.map((e=>`${e.description}`))}\n
    \n
    \n `}(f)}\n
    `:""}\n
    \n
    \n
  • `}(this.events,this.destinations,this.offers)}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}class p{constructor(e,t,n){this.event=e,this.destinations=t,this.offers=n}getTemplate(){return function(e,t,n){const{basePrice:i,isFavorite:s,dateFrom:a,dateTo:r,type:c}=e,p=n.find((t=>t.type===e.type)).offers.filter((t=>e.offers.includes(t.id))),v=t.find((t=>t.id===e.destination)),d=function(e,t){const n=l()(e),i=l()(t).diff(n),s=Math.floor(i/36e5),a=Math.floor(i%36e5/6e4),r=Math.ceil(s/24);let o=`${r}D ${s}H ${a}M`;return 0===r&&(o=`${s}H ${a}M`),0===r&&0===s&&(o=`${a}M`),o}(a,r);return`\n
  • \n
    \n \n
    \n Event type icon\n
    \n

    ${c} ${v.name}

    \n
    \n

    \n \n —\n \n

    \n

    ${d}

    \n
    \n

    \n € ${i}\n

    \n

    Offers:

    \n
      \n ${function(e){return e.map((e=>`
    • \n ${e.title}\n +€ \n ${e.price}\n
    • `)).join("")}(p)}\n
    \n \n \n
    \n
  • \n`;var u}(this.event,this.destinations,this.offers)}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}class v{getTemplate(){return'\n
  • \n
    \n
    \n
    \n \n \n\n
    \n
    \n Event type\n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n
    \n
    \n
    \n\n
    \n \n \n \n \n \n \n \n
    \n\n
    \n \n \n —\n \n \n
    \n\n
    \n \n \n
    \n\n \n \n
    \n
    \n
    \n

    Offers

    \n\n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n
    \n
    \n\n
    \n

    Destination

    \n

    Geneva is a city in Switzerland that lies at the southern tip of expansive Lac Léman (Lake Geneva). Surrounded by the Alps and Jura mountains, the city has views of dramatic Mont Blanc.

    \n\n
    \n
    \n Event photo\n Event photo\n Event photo\n Event photo\n Event photo\n
    \n
    \n
    \n
    \n
    \n
  • \n'}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}const d=[{id:"1",basePrice:200,dateFrom:"2024-11-10T22:55:56",dateTo:"2024-11-11T11:22:13",destination:"3",isFavorite:!1,offers:["1","4"],type:"taxi"},{id:"2",basePrice:90,dateFrom:"2024-11-12T22:55:56",dateTo:"2024-11-13T11:22:13",destination:"1",isFavorite:!1,offers:["2","4"],type:"bus"},{id:"3",basePrice:900,dateFrom:"2024-11-14T02:42:56",dateTo:"2024-11-14T11:22:13",destination:"2",isFavorite:!0,offers:["1","2"],type:"flight"},{id:"4",basePrice:300,dateFrom:"2024-11-16T22:55:56",dateTo:"2024-11-17T11:22:13",destination:"4",isFavorite:!1,offers:[],type:"train"}],u=[{id:"1",description:"Chamonix, is a beautiful city, a true asian pearl, with crowded streets.",name:"Chamonix",pictures:[{src:"http://picsum.photos/300/200?r=0.0762563005163317",description:"Chamonix parliament building"}]},{id:"2",description:"Bangkok is a vibrant metropolis known for its ornate temples, bustling street life.",name:"Bangkok",pictures:[{src:"https://en.wikipedia.org/wiki/King_Power_Mahanakhon#/media/File:Tha%C3%AFlande_Bangkok_MahaNakhon.jpg",description:"King Power Mahanakhon"}]},{id:"3",description:"Istanbul is a vibrant city bridging Europe and Asia.",name:"Istanbul",pictures:[{src:"http://picsum.photos/300/200?r=0.0762563005163317",description:"Istanbul Grand Bazaar"}]},{id:"4",description:"Amsterdam is a picturesque city known for its canals.",name:"Amsterdam",pictures:[]}],_=[{type:"taxi",offers:[{id:"1",title:"Upgrade to a business class",price:120},{id:"2",title:"Upgrade to a limousine",price:300},{id:"3",title:"Upgrade to a minivan",price:30},{id:"4",title:"oversized luggage",price:60},{id:"5",title:"chair for child",price:30}]},{type:"bus",offers:[]},{type:"flight",offers:[{id:"1",title:"Upgrade to a business class",price:500},{id:"2",title:"Upgrade to a first class",price:1e3},{id:"3",title:"Platinum last minute upgrade.",price:20},{id:"4",title:"luggage +10kg",price:40}]},{type:"train",offers:[{id:"1",title:"Upgrade to a business class",price:120},{id:"2",title:"Upgrade to a luxury class",price:120},{id:"3",title:"shower",price:10},{id:"4",title:"Dinner",price:20},{id:"5",title:"",price:120},{id:"6",title:"Upgrade to a business class",price:120}]}],f=document.querySelector(".trip-controls__filters"),h=document.querySelector(".trip-events"),m=new class{#e=d;#t=u;#n=_;getEvents(){return this.#e}getDestinations(){return this.#t}getOffers(){return this.#n}},y=new class{filtersView=new i;sortsViev=new s;eventListView=new a;eventView=new v;constructor({filtersContainer:e,eventsContainer:t,model:n}){this.model=n,this.filtersContainer=e,this.eventsContainer=t}init(){const e=this.model.getDestinations(),n=this.model.getOffers(),a=this.model.getEvents();t(new i,this.filtersContainer),t(new s,this.eventsContainer),t(this.eventListView,this.eventsContainer,"afterend"),t(new c(a,e,n),this.eventListView.getElement(),"afterbegin");for(const i of a)t(new p(i,e,n),this.eventListView.getElement())}}({filtersContainer:f,eventsContainer:h,model:m});y.init()})()})(); +//# sourceMappingURL=bundle.10692b0fccb036138080.js.map \ No newline at end of file diff --git a/4/bundle.10692b0fccb036138080.js.map b/4/bundle.10692b0fccb036138080.js.map new file mode 100644 index 0000000..c5768cd --- /dev/null +++ b/4/bundle.10692b0fccb036138080.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.10692b0fccb036138080.js","mappings":"6BAAoEA,EAAOC,QAAkI,WAAY,aAAa,IAAUC,EAAE,IAAIC,EAAE,KAAKC,EAAE,cAAcC,EAAE,SAASC,EAAE,SAASC,EAAE,OAAOC,EAAE,MAAMC,EAAE,OAAOC,EAAE,QAAQC,EAAE,UAAUC,EAAE,OAAOC,EAAE,OAAOC,EAAE,eAAeC,EAAE,6FAA6FC,EAAE,sFAAsFC,EAAE,CAACC,KAAK,KAAKC,SAAS,2DAA2DC,MAAM,KAAKC,OAAO,wFAAwFD,MAAM,KAAKE,QAAQ,SAASC,GAAG,IAAIrB,EAAE,CAAC,KAAK,KAAK,KAAK,MAAMC,EAAEoB,EAAE,IAAI,MAAM,IAAIA,GAAGrB,GAAGC,EAAE,IAAI,KAAKD,EAAEC,IAAID,EAAE,IAAI,GAAG,GAAGsB,EAAE,SAASD,EAAErB,EAAEC,GAAG,IAAIC,EAAEqB,OAAOF,GAAG,OAAOnB,GAAGA,EAAEsB,QAAQxB,EAAEqB,EAAE,GAAGI,MAAMzB,EAAE,EAAEE,EAAEsB,QAAQE,KAAKzB,GAAGoB,CAAC,EAAEM,EAAE,CAACvB,EAAEkB,EAAEM,EAAE,SAASP,GAAG,IAAIrB,GAAGqB,EAAEQ,YAAY5B,EAAE6B,KAAKC,IAAI/B,GAAGE,EAAE4B,KAAKE,MAAM/B,EAAE,IAAIE,EAAEF,EAAE,GAAG,OAAOD,GAAG,EAAE,IAAI,KAAKsB,EAAEpB,EAAE,EAAE,KAAK,IAAIoB,EAAEnB,EAAE,EA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EAAShH,KAAKqK,MAAMG,YACpB1D,EAAS9G,KAAKqK,MAAMC,YAE1BzE,EAAO,IAAIM,EAAenG,KAAKkK,kBAC/BrE,EAAO,IAAIU,EAAavG,KAAKoK,iBAC7BvE,EAAO7F,KAAK4K,cAAe5K,KAAKoK,gBbzBxB,Ya0BRvE,EAAO,IAAIe,EAAcE,EAAQC,EAAcC,GAAShH,KAAK4K,cAAc1E,ab5BjE,ca+BV,IAAI,MAAMe,KAASH,EACjBjB,EAAO,IAAIsD,EAAclC,EAAOF,EAAcC,GAAShH,KAAK4K,cAAc1E,aAE9E,GD7BwC,CAACgE,mBAAkBE,kBAAiBC,UAE9EI,EAAe/J,M","sources":["webpack://big-trip/./node_modules/dayjs/dayjs.min.js","webpack://big-trip/webpack/bootstrap","webpack://big-trip/webpack/runtime/compat get default export","webpack://big-trip/webpack/runtime/define property getters","webpack://big-trip/webpack/runtime/hasOwnProperty shorthand","webpack://big-trip/./src/render.js","webpack://big-trip/./src/view/filters-view.js","webpack://big-trip/./src/view/sorts-view.js","webpack://big-trip/./src/view/events-list-view.js","webpack://big-trip/./src/utils.js","webpack://big-trip/./src/view/event-edit-view.js","webpack://big-trip/./src/view/event-item-view.js","webpack://big-trip/./src/view/event-view.js","webpack://big-trip/./src/model/model.js","webpack://big-trip/./src/mocks/events.js","webpack://big-trip/./src/mocks/destinations.js","webpack://big-trip/./src/mocks/offers.js","webpack://big-trip/./src/main.js","webpack://big-trip/./src/presenter/board-presenter.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","const RenderPosition = {\n BEFOREBEGIN: 'beforebegin',\n AFTERBEGIN: 'afterbegin',\n BEFOREEND: 'beforeend',\n AFTEREND: 'afterend',\n};\n\nfunction createElement(template) {\n const newElement = document.createElement('div');\n newElement.innerHTML = template;\n\n return newElement.firstElementChild;\n}\n\nfunction render(component, container, place = RenderPosition.BEFOREEND) {\n container.insertAdjacentElement(place, component.getElement());\n}\n\nexport {RenderPosition, createElement, render};\n","import {createElement} from '../render.js';\n\nfunction createFilterTemplate(){\n return `\n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n `;\n}\n\nexport default class FiltersView{\n getTemplate(){\n return createFilterTemplate();\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n","import {createElement} from '../render.js';\n\nfunction createSortTemplate(){\n return `\n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n
    \n`;\n}\n\nexport default class SortsView{\n getTemplate(){\n return createSortTemplate();\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n","import {createElement} from '../render.js';\n\nfunction createEventsListView(){\n return '
      ';\n}\n\nexport default class EventListView{\n getTemplate(){\n return createEventsListView();\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n","import dayjs from 'dayjs';\n\nconst DATE_FORMAT = 'MMM DD';\nconst TIME_FORMAT = 'HH:mm';\n\nfunction humanizePointDueTime(dueDate) {\n return dueDate ? dayjs(dueDate).format(TIME_FORMAT) : '';\n}\n\nfunction humanizePointDueDate(dueDate) {\n return dueDate ? dayjs(dueDate).format(DATE_FORMAT) : '';\n}\n\nfunction getDifferenceTime(dateFrom, dateTo){\n const startDate = dayjs(dateFrom);\n const endDate = dayjs(dateTo);\n const difference = endDate.diff(startDate);\n const differenceHours = Math.floor(difference / (1000 * 60 * 60));\n const differenceMin = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60));\n const differenceDays = Math.ceil(differenceHours / 24);\n\n let differenceTime = `${differenceDays}D ${differenceHours }H ${differenceMin}M`;\n\n if(differenceDays === 0){\n differenceTime = `${differenceHours }H ${differenceMin }M`;\n }\n\n if(differenceDays === 0 && differenceHours === 0){\n differenceTime = `${differenceMin}M`;\n }\n\n return differenceTime;\n}\n\nconst capitalize = (word) => word[0].toUpperCase() + word.slice(1);\n\nexport {humanizePointDueDate, humanizePointDueTime, getDifferenceTime, capitalize};\n","import {createElement} from '../render.js';\nimport { humanizePointDueTime, capitalize } from '../utils';\n\nfunction createEventTypeTimplate(eventTypes, eventId, type){\n eventTypes.map((eventType) => (\n `
      \n \n \n
      `\n )).join('');\n}\n\nfunction getDestinationsTemplate(destinations){\n destinations.map((destination) => ``).join('');\n}\n\nfunction getPictures(pictures){\n if(pictures.length === 0){\n return '';\n }\n return `\n
      \n
      \n ${pictures.map((picture) => `\"${picture.description}\"`)}\n
      \n
      \n `;\n}\n\nfunction selectsCheckedTypeOffers(pointOffers, eventId, typeOffers){\n return typeOffers.map((typeOffer)=>(\n `
      \n offer.id === typeOffer.id) ? 'checked' : ''}>\n \n
      `\n )).join('');\n}\n\nfunction createEventEditTemplate(events, destinations, offers){\n const event = events[0]; //уточнить\n const eventId = event.id;\n\n const pointDestination = destinations.find((destination) => destination.id === event.destination);\n const typeOffers = offers.find((offer) => offer.type === event.type).offers;\n const pointOffers = typeOffers.filter((typeOffer) => event.offers.includes(typeOffer.id));\n\n const {basePrice, dateFrom, dateTo, type} = event;\n const {name, description, pictures} = pointDestination;\n\n const eventTypes = events.map((evt) => evt.type);\n\n return `\n
    • \n
      \n
      \n
      \n \n \n\n
      \n
      \n Event type\n ${createEventTypeTimplate(eventTypes, eventId, type)}\n
      \n
      \n
      \n\n
      \n \n \n \n ${getDestinationsTemplate(destinations)}\n \n
      \n\n
      \n \n \n —\n \n \n
      \n\n
      \n \n \n
      \n\n \n \n ${event.id ? (\n ``\n ) : ''}\n
      \n\n
      \n ${typeOffers.length > 0 ?\n `
      \n

      Offers

      \n
      \n ${selectsCheckedTypeOffers(pointOffers, eventId, typeOffers)}\n
      \n
      `\n : ''}\n ${pointDestination ? (\n `
      \n

      Destination

      \n

      ${description}

      \n ${getPictures(pictures)}\n
      `\n ) : ''}\n
      \n
      \n
    • `;\n}\nexport default class EventEditView{\n\n constructor (events, destinations, offers){\n this.events = events;\n this.destinations = destinations;\n this.offers = offers;\n }\n\n getTemplate(){\n return createEventEditTemplate(this.events, this.destinations, this.offers);\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n\n","import {createElement} from '../render.js';\nimport { humanizePointDueDate, humanizePointDueTime } from '../utils';\nimport {getDifferenceTime} from '../utils.js';\n\nfunction createEventOffersTemplate(eventOffers) {\n return eventOffers.map((eventOffer) => (\n `
    • \n ${eventOffer.title}\n +€ \n ${eventOffer.price}\n
    • `\n )).join('');\n}\n\nfunction createEventItemTemplate(event, destinations, offers){\n\n const {basePrice, isFavorite, dateFrom, dateTo, type} = event;\n\n const typeOffers = offers.find((offer) => offer.type === event.type).offers;\n const eventOffers = typeOffers.filter((typeOffer) => event.offers.includes(typeOffer.id));\n const eventDestination = destinations.find((destination) => destination.id === event.destination);\n\n const differenceTime = getDifferenceTime(dateFrom, dateTo);\n\n return`\n
    • \n
      \n \n
      \n \"Event\n
      \n

      ${type} ${eventDestination.name}

      \n
      \n

      \n \n —\n \n

      \n

      ${differenceTime}

      \n
      \n

      \n € ${basePrice}\n

      \n

      Offers:

      \n
        \n ${createEventOffersTemplate(eventOffers)}\n
      \n \n \n
      \n
    • \n`;\n}\n\nexport default class EventItemView{\n constructor (event, destinations, offers){\n this.event = event;\n this.destinations = destinations;\n this.offers = offers;\n }\n\n getTemplate(){\n return createEventItemTemplate(this.event, this.destinations, this.offers);\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n\n\n","import {createElement} from '../render.js';\n\nfunction createEventTemplate(){\n\n return`\n
    • \n
      \n
      \n
      \n \n \n\n
      \n
      \n Event type\n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n
      \n
      \n
      \n\n
      \n \n \n \n \n \n \n \n
      \n\n
      \n \n \n —\n \n \n
      \n\n
      \n \n \n
      \n\n \n \n
      \n
      \n
      \n

      Offers

      \n\n
      \n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n
      \n
      \n\n
      \n

      Destination

      \n

      Geneva is a city in Switzerland that lies at the southern tip of expansive Lac Léman (Lake Geneva). Surrounded by the Alps and Jura mountains, the city has views of dramatic Mont Blanc.

      \n\n
      \n
      \n \"Event\n \"Event\n \"Event\n \"Event\n \"Event\n
      \n
      \n
      \n
      \n
      \n
    • \n`;\n}\n\nexport default class EventView{\n\n getTemplate(){\n return createEventTemplate();\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n","import {getEvents} from '../mocks/events.js';\nimport {getDestinations} from '../mocks/destinations.js';\nimport {getOffers} from '../mocks/offers.js';\nconst events = getEvents();\nconst destinations = getDestinations();\nconst offers = getOffers();\nexport default class Model{\n\n #events = events;\n #destinations = destinations;\n #offers = offers;\n\n getEvents (){\n return this. #events;\n }\n\n getDestinations (){\n return this.#destinations;\n }\n\n getOffers(){\n return this.#offers;\n }\n}\n\n","const events = [\n {\n id: '1',\n basePrice: 200,\n dateFrom: '2024-11-10T22:55:56',\n dateTo: '2024-11-11T11:22:13',\n destination: '3',\n isFavorite: false,\n offers: ['1', '4'],\n type: 'taxi'\n },\n {\n id: '2',\n basePrice: 90,\n dateFrom: '2024-11-12T22:55:56',\n dateTo: '2024-11-13T11:22:13',\n destination: '1',\n isFavorite: false,\n offers: ['2', '4'],\n type: 'bus'\n },\n {\n id: '3',\n basePrice: 900,\n dateFrom: '2024-11-14T02:42:56',\n dateTo: '2024-11-14T11:22:13',\n destination: '2',\n isFavorite: true,\n offers: ['1', '2'],\n type: 'flight'\n },\n {\n id: '4',\n basePrice: 300,\n dateFrom: '2024-11-16T22:55:56',\n dateTo: '2024-11-17T11:22:13',\n destination: '4',\n isFavorite: false,\n offers: [],\n type: 'train'\n }\n];\n\nexport function getEvents (){\n return events;\n}\n\n\n","const destinations =\n [\n {\n id: '1',\n description: 'Chamonix, is a beautiful city, a true asian pearl, with crowded streets.',\n name: 'Chamonix',\n pictures: [\n {\n src: 'http://picsum.photos/300/200?r=0.0762563005163317',\n description: 'Chamonix parliament building'\n }\n ]\n },\n {\n id: '2',\n description: 'Bangkok is a vibrant metropolis known for its ornate temples, bustling street life.',\n name: 'Bangkok',\n pictures: [\n {\n src: 'https://en.wikipedia.org/wiki/King_Power_Mahanakhon#/media/File:Tha%C3%AFlande_Bangkok_MahaNakhon.jpg',\n description: 'King Power Mahanakhon'\n }\n ]\n },\n {\n id: '3',\n description: 'Istanbul is a vibrant city bridging Europe and Asia.',\n name: 'Istanbul',\n pictures: [\n {\n src: 'http://picsum.photos/300/200?r=0.0762563005163317',\n description: 'Istanbul Grand Bazaar'\n }\n ]\n },\n {\n id: '4',\n description: 'Amsterdam is a picturesque city known for its canals.',\n name: 'Amsterdam',\n pictures: []\n }\n ];\n\nexport function getDestinations (){\n return destinations;\n}\n","const offers = [\n {\n type: 'taxi',\n offers: [\n {\n id: '1',\n title: 'Upgrade to a business class',\n price: 120\n },\n {\n id: '2',\n title: 'Upgrade to a limousine',\n price: 300\n },\n {\n id: '3',\n title: 'Upgrade to a minivan',\n price: 30\n },\n {\n id: '4',\n title: 'oversized luggage',\n price: 60\n },\n {\n id: '5',\n title: 'chair for child',\n price: 30\n }\n ]\n },\n {\n type: 'bus',\n offers: []\n },\n {\n type: 'flight',\n offers: [\n {\n id: '1',\n title: 'Upgrade to a business class',\n price: 500\n },\n {\n id: '2',\n title: 'Upgrade to a first class',\n price: 1000\n },\n {\n id: '3',\n title: 'Platinum last minute upgrade.',\n price: 20\n },\n {\n id: '4',\n title: 'luggage +10kg',\n price: 40\n }\n ]\n },\n {\n type: 'train',\n offers: [\n {\n id: '1',\n title: 'Upgrade to a business class',\n price: 120\n },\n {\n id: '2',\n title: 'Upgrade to a luxury class',\n price: 120\n },\n {\n id: '3',\n title: 'shower',\n price: 10\n },\n {\n id: '4',\n title: 'Dinner',\n price: 20\n },\n {\n id: '5',\n title: '',\n price: 120\n },\n {\n id: '6',\n title: 'Upgrade to a business class',\n price: 120\n }\n ]\n }\n];\n\nexport function getOffers(){\n return offers;\n}\n","import BoardPresenter from './presenter/board-presenter.js';\nimport Model from './model/model.js';\n\nconst filtersContainer = document.querySelector('.trip-controls__filters');\nconst eventsContainer = document.querySelector('.trip-events');\n\nconst model = new Model();\nconst boardPresenter = new BoardPresenter({filtersContainer, eventsContainer, model});\n\nboardPresenter.init();\n\n","import {render, RenderPosition} from '../render.js';\nimport FiltersView from '../view/filters-view.js';\nimport SortsView from '../view/sorts-view.js';\nimport EventListView from '../view/events-list-view.js';\nimport EventEditView from '../view/event-edit-view.js';\nimport EventItemView from '../view/event-item-view.js';\nimport EventView from '../view/event-view.js';\n\nexport default class BoardPresenter{\n\n filtersView = new FiltersView();\n sortsViev = new SortsView();\n eventListView = new EventListView();\n eventView = new EventView();\n\n constructor({filtersContainer, eventsContainer, model}){\n\n this.model = model;\n this.filtersContainer = filtersContainer;\n this.eventsContainer = eventsContainer;\n }\n\n init(){\n const destinations = this.model.getDestinations();\n const offers = this.model.getOffers();\n const events = this.model.getEvents();\n\n render(new FiltersView(), this.filtersContainer);\n render(new SortsView(), this.eventsContainer);\n render(this.eventListView, this.eventsContainer, RenderPosition.AFTEREND);\n render(new EventEditView(events, destinations, offers), this.eventListView.getElement(), RenderPosition.AFTERBEGIN);\n //render(new EventView(), this.eventListView.getElement(), RenderPosition.AFTERBEGIN);\n\n for(const event of events){\n render(new EventItemView(event, destinations, offers), this.eventListView.getElement());\n }\n }\n}\n"],"names":["module","exports","e","n","r","i","s","u","a","o","c","f","h","d","l","$","y","M","name","weekdays","split","months","ordinal","t","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","S","_","O","args","arguments","b","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","monthsShort","weekdaysMin","weekdaysShort","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","k","forEach","extend","$i","isDayjs","en","Ls","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call","getter","__esModule","definition","key","Object","defineProperty","enumerable","obj","prop","hasOwnProperty","createElement","template","newElement","document","innerHTML","firstElementChild","render","component","container","place","insertAdjacentElement","getElement","FiltersView","getTemplate","element","removeElement","SortsView","EventListView","humanizePointDueTime","dueDate","dayjs","EventEditView","constructor","events","destinations","offers","event","eventId","id","pointDestination","find","destination","typeOffers","offer","type","pointOffers","filter","typeOffer","includes","basePrice","dateFrom","dateTo","description","pictures","eventTypes","map","eventType","word","toUpperCase","createEventTypeTimplate","evt","getDestinationsTemplate","title","some","price","selectsCheckedTypeOffers","picture","src","getPictures","createEventEditTemplate","EventItemView","isFavorite","eventOffers","eventDestination","differenceTime","startDate","difference","differenceHours","differenceMin","differenceDays","getDifferenceTime","eventOffer","createEventOffersTemplate","createEventItemTemplate","EventView","filtersContainer","querySelector","eventsContainer","model","getEvents","getDestinations","getOffers","boardPresenter","filtersView","sortsViev","eventListView","eventView"],"sourceRoot":""} \ No newline at end of file diff --git a/4/bundle.7f3b310244e6434e3bec.js b/4/bundle.7f3b310244e6434e3bec.js deleted file mode 100644 index 0395a4e..0000000 --- a/4/bundle.7f3b310244e6434e3bec.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var e={484:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",r="day",l="week",o="month",c="quarter",p="year",v="date",d="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},h=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},m={s:h,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),s=n%60;return(t<=0?"+":"-")+h(i,2,"0")+":"+h(s,2,"0")},m:function e(t,n){if(t.date()1)return e(r[0])}else{var l=t.name;b[l]=t,s=l}return!i&&s&&(y=s),s||!i&&y},M=function(e,t){if($(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new x(n)},k=m;k.l=w,k.i=$,k.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function f(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[g]=!0}var h=f.prototype;return h.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(u);if(i){var s=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],s,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],s,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(t)}(e),this.init()},h.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},h.$utils=function(){return k},h.isValid=function(){return!(this.$d.toString()===d)},h.isSame=function(e,t){var n=M(e);return this.startOf(t)<=n&&n<=this.endOf(t)},h.isAfter=function(e,t){return M(e){var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e){const t=document.createElement("div");return t.innerHTML=e,t.firstElementChild}function t(e,t,n="beforeend"){t.insertAdjacentElement(n,e.getElement())}class i{getTemplate(){return'\n
      \n
      \n \n \n
      \n
      \n \n \n
      \n
      \n \n \n
      \n
      \n \n \n
      \n
      \n '}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}class s{getTemplate(){return'\n
      \n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n\n
      \n \n \n
      \n
      \n'}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}class a{getTemplate(){return'
        '}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}const r=[{id:"1",basePrice:200,dateFrom:"2024-11-10T22:55:56",dateTo:"2024-11-11T11:22:13",destination:"3",isFavorite:!1,offers:["1","4"],type:"taxi"},{id:"2",basePrice:90,dateFrom:"2024-11-12T22:55:56",dateTo:"2024-11-13T11:22:13",destination:"1",isFavorite:!1,offers:["2","4"],type:"bus"},{id:"3",basePrice:900,dateFrom:"2024-11-14T02:42:56",dateTo:"2024-11-14T11:22:13",destination:"2",isFavorite:!0,offers:["1","2"],type:"flight"},{id:"4",basePrice:300,dateFrom:"2024-11-16T22:55:56",dateTo:"2024-11-17T11:22:13",destination:"4",isFavorite:!1,offers:[],type:"train"}];var l=n(484),o=n.n(l);function c(e){return e?o()(e).format("HH:mm"):""}class p{constructor(e,t,n){this.events=e,this.destinations=t,this.offers=n}getTemplate(){return function(e,t,n){const i=t.find((t=>t.id===e.destination)),s=n.find((t=>t.type===e.type)).offers,a=s.filter((t=>e.offers.includes(t.id))),{basePrice:l,dateFrom:o,dateTo:p,type:v}=e,{name:d,description:u,pictures:_}=i,f=e.id,h=new Set;r.forEach((e=>h.add(e.type)));const m=[...h];return`\n
      • \n
        \n
        \n
        \n \n \n\n
        \n
        \n Event type\n ${m.map((e=>{return`
        \n \n \n
        `;var t})).join("")}\n
        \n
        \n
        \n\n
        \n \n \n \n ${t.map((e=>``)).join("")}\n \n
        \n\n
        \n \n \n —\n \n \n
        \n\n
        \n \n \n
        \n\n \n \n ${e.id?'':""}\n
        \n\n
        \n ${s.length>0?`
        \n

        Offers

        \n\n
        \n\n ${s.map((e=>`
        \n t.id===e.id))?"checked":""}>\n \n
        `)).join("")}\n
        \n
        `:""}\n ${i?`
        \n

        Destination

        \n

        ${u}

        \n ${_.length>0?`
        \n
        \n ${_.map((e=>`${e.description}`))}\n
        \n
        `:""}\n
        `:""}\n
        \n
        \n
      • `}(this.events,this.destinations,this.offers)}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}class v{constructor(e,t,n){this.event=e,this.destinations=t,this.offers=n}getTemplate(){return function(e,t,n){const{basePrice:i,isFavorite:s,dateFrom:a,dateTo:r,type:l}=e,p=n.find((t=>t.type===e.type)).offers.filter((t=>e.offers.includes(t.id))),v=t.filter((t=>t.id===e.destination)),d=function(e,t){const n=o()(e),i=o()(t).diff(n),s=Math.floor(i/36e5),a=Math.floor(i%36e5/6e4),r=Math.ceil(s/24);let l=`${r}D ${s}H ${a}M`;return 0===r&&(l=`${s}H ${a}M`),0===r&&0===s&&(l=`${a}M`),l}(a,r);return`\n
      • \n
        \n \n
        \n Event type icon\n
        \n

        ${l} ${v[0].name}

        \n
        \n

        \n \n —\n \n

        \n

        ${d}

        \n
        \n

        \n € ${i}\n

        \n

        Offers:

        \n
          \n ${function(e){return e.map((e=>`
        • \n ${e.title}\n +€ \n ${e.price}\n
        • `)).join("")}(p)}\n
        \n \n \n
        \n
      • \n`;var u}(this.event,this.destinations,this.offers)}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}class d{getTemplate(){return'\n
      • \n
        \n
        \n
        \n \n \n\n
        \n
        \n Event type\n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n
        \n
        \n
        \n\n
        \n \n \n \n \n \n \n \n
        \n\n
        \n \n \n —\n \n \n
        \n\n
        \n \n \n
        \n\n \n \n
        \n
        \n
        \n

        Offers

        \n\n
        \n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n
        \n
        \n\n
        \n

        Destination

        \n

        Geneva is a city in Switzerland that lies at the southern tip of expansive Lac Léman (Lake Geneva). Surrounded by the Alps and Jura mountains, the city has views of dramatic Mont Blanc.

        \n\n
        \n
        \n Event photo\n Event photo\n Event photo\n Event photo\n Event photo\n
        \n
        \n
        \n
        \n
        \n
      • \n'}getElement(){return this.element||(this.element=e(this.getTemplate())),this.element}removeElement(){this.element=null}}const u=[{id:"1",description:"Chamonix, is a beautiful city, a true asian pearl, with crowded streets.",name:"Chamonix",pictures:[{src:"http://picsum.photos/300/200?r=0.0762563005163317",description:"Chamonix parliament building"}]},{id:"2",description:"Bangkok is a vibrant metropolis known for its ornate temples, bustling street life.",name:"Bangkok",pictures:[{src:"https://en.wikipedia.org/wiki/King_Power_Mahanakhon#/media/File:Tha%C3%AFlande_Bangkok_MahaNakhon.jpg",description:"King Power Mahanakhon"}]},{id:"3",description:"Istanbul is a vibrant city bridging Europe and Asia.",name:"Istanbul",pictures:[{src:"http://picsum.photos/300/200?r=0.0762563005163317",description:"Istanbul Grand Bazaar"}]},{id:"4",description:"Amsterdam is a picturesque city known for its canals.",name:"Amsterdam",pictures:[]}],_=[{type:"taxi",offers:[{id:"1",title:"Upgrade to a business class",price:120},{id:"2",title:"Upgrade to a limousine",price:300},{id:"3",title:"Upgrade to a minivan",price:30},{id:"4",title:"oversized luggage",price:60},{id:"5",title:"chair for child",price:30}]},{type:"bus",offers:[]},{type:"flight",offers:[{id:"1",title:"Upgrade to a business class",price:500},{id:"2",title:"Upgrade to a first class",price:1e3},{id:"3",title:"Platinum last minute upgrade.",price:20},{id:"4",title:"luggage +10kg",price:40}]},{type:"train",offers:[{id:"1",title:"Upgrade to a business class",price:120},{id:"2",title:"Upgrade to a luxury class",price:120},{id:"3",title:"shower",price:10},{id:"4",title:"Dinner",price:20},{id:"5",title:"",price:120},{id:"6",title:"Upgrade to a business class",price:120}]}],f=document.querySelector(".trip-controls__filters"),h=document.querySelector(".trip-events"),m=new class{events=r;destinations=u;offers=_;getEvents(){return this.events}getDestinations(){return this.destinations}getOffers(){return this.offers}},y=new class{filtersView=new i;sortsViev=new s;eventListView=new a;eventView=new d;constructor({filtersContainer:e,eventsContainer:t,model:n}){this.model=n,this.filtersContainer=e,this.eventsContainer=t}init(){const e=this.model.getDestinations(),n=this.model.getOffers(),a=this.model.getEvents();t(new i,this.filtersContainer),t(new s,this.eventsContainer),t(this.eventListView,this.eventsContainer,"afterend"),t(new p(a[0],e,n),this.eventListView.getElement(),"afterbegin");for(let i=0;i=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","const RenderPosition = {\n BEFOREBEGIN: 'beforebegin',\n AFTERBEGIN: 'afterbegin',\n BEFOREEND: 'beforeend',\n AFTEREND: 'afterend',\n};\n\nfunction createElement(template) {\n const newElement = document.createElement('div');\n newElement.innerHTML = template;\n\n return newElement.firstElementChild;\n}\n\nfunction render(component, container, place = RenderPosition.BEFOREEND) {\n container.insertAdjacentElement(place, component.getElement());\n}\n\nexport {RenderPosition, createElement, render};\n","import {createElement} from '../render.js';\n\nfunction createFilterTemplate(){\n return `\n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n `;\n}\n\nexport default class FiltersView{\n getTemplate(){\n return createFilterTemplate();\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n","import {createElement} from '../render.js';\n\nfunction createSortTemplate(){\n return `\n
        \n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n\n
        \n \n \n
        \n
        \n`;\n}\n\nexport default class SortsView{\n getTemplate(){\n return createSortTemplate();\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n","import {createElement} from '../render.js';\n\nfunction createEventsListView(){\n return '
          ';\n}\n\nexport default class EventListView{\n getTemplate(){\n return createEventsListView();\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n","export const events = [\n {\n id: '1',\n basePrice: 200,\n dateFrom: '2024-11-10T22:55:56',\n dateTo: '2024-11-11T11:22:13',\n destination: '3',\n isFavorite: false,\n offers: ['1', '4'],\n type: 'taxi'\n },\n {\n id: '2',\n basePrice: 90,\n dateFrom: '2024-11-12T22:55:56',\n dateTo: '2024-11-13T11:22:13',\n destination: '1',\n isFavorite: false,\n offers: ['2', '4'],\n type: 'bus'\n },\n {\n id: '3',\n basePrice: 900,\n dateFrom: '2024-11-14T02:42:56',\n dateTo: '2024-11-14T11:22:13',\n destination: '2',\n isFavorite: true,\n offers: ['1', '2'],\n type: 'flight'\n },\n {\n id: '4',\n basePrice: 300,\n dateFrom: '2024-11-16T22:55:56',\n dateTo: '2024-11-17T11:22:13',\n destination: '4',\n isFavorite: false,\n offers: [],\n type: 'train'\n }\n];\n\nexport function getEvents (){\n return events;\n}\n\n\n","import dayjs from 'dayjs';\n\nconst DATE_FORMAT = 'MMM DD';\nconst TIME_FORMAT = 'HH:mm';\n\nfunction humanizePointDueTime(dueDate) {\n return dueDate ? dayjs(dueDate).format(TIME_FORMAT) : '';\n}\n\nfunction humanizePointDueDate(dueDate) {\n return dueDate ? dayjs(dueDate).format(DATE_FORMAT) : '';\n}\n\nfunction getDiferenceTime(dateFrom, dateTo){\n const startDate = dayjs(dateFrom);\n const endDate = dayjs(dateTo);\n const difference = endDate.diff(startDate);\n const differenceHours = Math.floor(difference / (1000 * 60 * 60));\n const differenceMin = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60));\n const differenceDays = Math.ceil(differenceHours / 24);\n\n let differenceTime = `${differenceDays}D ${differenceHours }H ${differenceMin}M`;\n if(differenceDays === 0){\n differenceTime = `${differenceHours }H ${differenceMin }M`;\n }\n if(differenceDays === 0 && differenceHours === 0){\n differenceTime = `${differenceMin}M`;\n }\n return differenceTime;\n}\n\nconst capitalize = (word) => word[0].toUpperCase() + word.slice(1);\n\nexport {humanizePointDueDate, humanizePointDueTime, getDiferenceTime, capitalize};\n","import {createElement} from '../render.js';\nimport { getEvents } from '../mocks/events.js';\nimport { humanizePointDueTime, capitalize } from '../utils';\n\nfunction createEventEditTemplate(event, destinations, offers){\n\n const pointDestination = destinations.find((destination) => destination.id === event.destination);\n const typeOffers = offers.find((offer) => offer.type === event.type).offers;\n const pointOffers = typeOffers.filter((typeOffer) => event.offers.includes(typeOffer.id));\n const {basePrice, dateFrom, dateTo, type} = event;\n const {name, description, pictures} = pointDestination;\n const eventId = event.id;\n\n const allEventTypes = new Set();\n getEvents().forEach((getEvent) => allEventTypes.add(getEvent.type));\n const eventTypes = [...allEventTypes];\n\n return `\n
        • \n
          \n
          \n
          \n \n \n\n
          \n
          \n Event type\n ${eventTypes.map((eventType) => (\n `
          \n \n \n
          `\n )).join('')}\n
          \n
          \n
          \n\n
          \n \n \n \n ${destinations.map((destination) => ``).join('')}\n \n
          \n\n
          \n \n \n —\n \n \n
          \n\n
          \n \n \n
          \n\n \n \n ${event.id ? (\n ``\n ) : ''}\n
          \n\n
          \n ${typeOffers.length > 0 ?\n `
          \n

          Offers

          \n\n
          \n\n ${typeOffers.map((typeOffer)=>(\n `
          \n offer.id === typeOffer.id) ? 'checked' : ''}>\n \n
          `\n )).join('')}\n
          \n
          `\n : ''}\n ${pointDestination ? (\n `
          \n

          Destination

          \n

          ${description}

          \n ${pictures.length > 0 ? (\n `
          \n
          \n ${pictures.map((picture) => `\"${picture.description}\"`)}\n
          \n
          `\n ) : ''}\n
          `\n ) : ''}\n
          \n
          \n
        • `;\n}\nexport default class EventEditView{\n\n constructor (events, destinations, offers){\n this.events = events;\n this.destinations = destinations;\n this.offers = offers;\n }\n\n getTemplate(){\n\n return createEventEditTemplate(this.events, this.destinations, this.offers);\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n\n","import {createElement} from '../render.js';\nimport { humanizePointDueDate, humanizePointDueTime } from '../utils';\nimport {getDiferenceTime} from '../utils.js';\n\nfunction createEventOffersTemplate(eventOffers) {\n return eventOffers.map((eventOffer) => (\n `
        • \n ${eventOffer.title}\n +€ \n ${eventOffer.price}\n
        • `\n )).join('');\n}\n\nfunction createEventItemTemplate(event, destinations, offers){\n\n const {basePrice, isFavorite, dateFrom, dateTo, type} = event;\n\n const typeOffers = offers.find((offer) => offer.type === event.type).offers;\n const eventOffers = typeOffers.filter((typeOffer) => event.offers.includes(typeOffer.id));\n const eventDestination = destinations.filter((destination) => destination.id === event.destination);\n\n const diferenceTime = getDiferenceTime(dateFrom, dateTo);\n\n return`\n
        • \n
          \n \n
          \n \"Event\n
          \n

          ${type} ${eventDestination[0].name}

          \n
          \n

          \n \n —\n \n

          \n

          ${diferenceTime}

          \n
          \n

          \n € ${basePrice}\n

          \n

          Offers:

          \n
            \n ${createEventOffersTemplate(eventOffers)}\n
          \n \n \n
          \n
        • \n`;\n}\n\nexport default class EventItemView{\n constructor (event, destinations, offers){\n this.event = event;\n this.destinations = destinations;\n this.offers = offers;\n }\n\n getTemplate(){\n return createEventItemTemplate(this.event, this.destinations, this.offers);\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n\n\n","import {createElement} from '../render.js';\n\nfunction createEventTemplate(){\n\n return`\n
        • \n
          \n
          \n
          \n \n \n\n
          \n
          \n Event type\n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n
          \n
          \n
          \n\n
          \n \n \n \n \n \n \n \n
          \n\n
          \n \n \n —\n \n \n
          \n\n
          \n \n \n
          \n\n \n \n
          \n
          \n
          \n

          Offers

          \n\n
          \n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n\n
          \n \n \n
          \n
          \n
          \n\n
          \n

          Destination

          \n

          Geneva is a city in Switzerland that lies at the southern tip of expansive Lac Léman (Lake Geneva). Surrounded by the Alps and Jura mountains, the city has views of dramatic Mont Blanc.

          \n\n
          \n
          \n \"Event\n \"Event\n \"Event\n \"Event\n \"Event\n
          \n
          \n
          \n
          \n
          \n
        • \n`;\n}\n\nexport default class EventView{\n\n\n getTemplate(){\n return createEventTemplate();\n }\n\n getElement(){\n if(!this.element){\n this.element = createElement(this.getTemplate());\n }\n return this.element;\n }\n\n removeElement(){\n this.element = null;\n }\n}\n","export const destinations =\n [\n {\n id: '1',\n description: 'Chamonix, is a beautiful city, a true asian pearl, with crowded streets.',\n name: 'Chamonix',\n pictures: [\n {\n src: 'http://picsum.photos/300/200?r=0.0762563005163317',\n description: 'Chamonix parliament building'\n }\n ]\n },\n {\n id: '2',\n description: 'Bangkok is a vibrant metropolis known for its ornate temples, bustling street life.',\n name: 'Bangkok',\n pictures: [\n {\n src: 'https://en.wikipedia.org/wiki/King_Power_Mahanakhon#/media/File:Tha%C3%AFlande_Bangkok_MahaNakhon.jpg',\n description: 'King Power Mahanakhon'\n }\n ]\n },\n {\n id: '3',\n description: 'Istanbul is a vibrant city bridging Europe and Asia.',\n name: 'Istanbul',\n pictures: [\n {\n src: 'http://picsum.photos/300/200?r=0.0762563005163317',\n description: 'Istanbul Grand Bazaar'\n }\n ]\n },\n {\n id: '4',\n description: 'Amsterdam is a picturesque city known for its canals.',\n name: 'Amsterdam',\n pictures: []\n }\n ];\n\nexport function getDestinations (){\n return destinations;\n}\n","export const offers = [\n {\n type: 'taxi',\n offers: [\n {\n id: '1',\n title: 'Upgrade to a business class',\n price: 120\n },\n {\n id: '2',\n title: 'Upgrade to a limousine',\n price: 300\n },\n {\n id: '3',\n title: 'Upgrade to a minivan',\n price: 30\n },\n {\n id: '4',\n title: 'oversized luggage',\n price: 60\n },\n {\n id: '5',\n title: 'chair for child',\n price: 30\n }\n ]\n },\n {\n type: 'bus',\n offers: []\n },\n {\n type: 'flight',\n offers: [\n {\n id: '1',\n title: 'Upgrade to a business class',\n price: 500\n },\n {\n id: '2',\n title: 'Upgrade to a first class',\n price: 1000\n },\n {\n id: '3',\n title: 'Platinum last minute upgrade.',\n price: 20\n },\n {\n id: '4',\n title: 'luggage +10kg',\n price: 40\n }\n ]\n },\n {\n type: 'train',\n offers: [\n {\n id: '1',\n title: 'Upgrade to a business class',\n price: 120\n },\n {\n id: '2',\n title: 'Upgrade to a luxury class',\n price: 120\n },\n {\n id: '3',\n title: 'shower',\n price: 10\n },\n {\n id: '4',\n title: 'Dinner',\n price: 20\n },\n {\n id: '5',\n title: '',\n price: 120\n },\n {\n id: '6',\n title: 'Upgrade to a business class',\n price: 120\n }\n ]\n }\n];\n\nexport function getOffers(){\n return offers;\n}\n","import BoardPresenter from './presenter/board-presenter.js';\nimport Model from './model/model.js';\n\nconst filtersContainer = document.querySelector('.trip-controls__filters');\nconst eventsContainer = document.querySelector('.trip-events');\n\nconst model = new Model();\nconst boardPresenter = new BoardPresenter({filtersContainer, eventsContainer, model});\n\nboardPresenter.init();\n\n","import {events} from '../mocks/events.js';\nimport {destinations} from '../mocks/destinations.js';\nimport {offers} from '../mocks/offers.js';\n\nexport default class Model{\n\n events = events;\n destinations = destinations;\n offers = offers;\n\n getEvents (){\n return this.events;\n }\n\n getDestinations (){\n return this.destinations;\n }\n\n getOffers(){\n return this.offers;\n }\n}\n\n","import {render, RenderPosition} from '../render.js';\nimport FiltersView from '../view/filters-view.js';\nimport SortsView from '../view/sorts-view.js';\nimport EventListView from '../view/events-list-view.js';\nimport EventEditView from '../view/event-edit-view.js';\nimport EventItemView from '../view/event-item-view.js';\nimport EventView from '../view/event-view.js';\n\nexport default class BoardPresenter{\n\n filtersView = new FiltersView();\n sortsViev = new SortsView();\n eventListView = new EventListView();\n eventView = new EventView();\n\n constructor({filtersContainer, eventsContainer, model}){\n\n this.model = model;\n this.filtersContainer = filtersContainer;\n this.eventsContainer = eventsContainer;\n }\n\n init(){\n const destinations = this.model.getDestinations();\n const offers = this.model.getOffers();\n const events = this.model.getEvents();\n\n render(new FiltersView(), this.filtersContainer);\n render(new SortsView(), this.eventsContainer);\n render(this.eventListView, this.eventsContainer, RenderPosition.AFTEREND);\n render(new EventEditView(events[0], destinations, offers), this.eventListView.getElement(), RenderPosition.AFTERBEGIN);\n //render(new EventView(), this.eventListView.getElement(), RenderPosition.AFTERBEGIN);\n\n for (let i = 0; i < events.length ; i += 1) {\n const event = events[i];\n render(new EventItemView(event, destinations, offers), this.eventListView.getElement());\n }\n }\n}\n"],"names":["module","exports","e","n","r","i","s","u","a","o","c","f","h","d","l","$","y","M","name","weekdays","split","months","ordinal","t","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","S","_","O","args","arguments","b","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","monthsShort","weekdaysMin","weekdaysShort","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","k","forEach","extend","$i","isDayjs","en","Ls","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call","getter","__esModule","definition","key","Object","defineProperty","enumerable","obj","prop","hasOwnProperty","createElement","template","newElement","document","innerHTML","firstElementChild","render","component","container","place","insertAdjacentElement","getElement","FiltersView","getTemplate","element","removeElement","SortsView","EventListView","events","id","basePrice","dateFrom","dateTo","destination","isFavorite","offers","type","humanizePointDueTime","dueDate","dayjs","EventEditView","constructor","destinations","event","pointDestination","find","typeOffers","offer","pointOffers","filter","typeOffer","includes","description","pictures","eventId","allEventTypes","Set","getEvent","eventTypes","map","eventType","word","toUpperCase","title","some","price","picture","src","createEventEditTemplate","EventItemView","eventOffers","eventDestination","diferenceTime","startDate","difference","differenceHours","differenceMin","differenceDays","differenceTime","getDiferenceTime","eventOffer","createEventOffersTemplate","createEventItemTemplate","EventView","filtersContainer","querySelector","eventsContainer","model","getEvents","getDestinations","getOffers","boardPresenter","filtersView","sortsViev","eventListView","eventView"],"sourceRoot":""} \ No newline at end of file diff --git a/4/index.html b/4/index.html index cad079a..8f5ae21 100644 --- a/4/index.html +++ b/4/index.html @@ -1 +1 @@ -Big Trip

          Trip events

          \ No newline at end of file +Big Trip

          Trip events

          \ No newline at end of file