1"use strict";(self.webpackChunkcapa_frontend=self.webpackChunkcapa_frontend||[]).push([[1095],{43647:function(t,e,r){r.d(e,{A:function(){return x}});var n,i,a,o,s,c,u,p=r(5743),l=r(25602),f=r(92517),d=r(41003),y=r(112),h=r(27192),v=r(95300),m=r(7391),b=r(44058),g=r(80159),k=r(83237),C=r(69614),A=r(88310),T=r(36826),w=r(4728),q=r(98308);function S(t,e,r,n){u||(u="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=t&&t.defaultProps,a=arguments.length-3;if(e||0===a||(e={children:void 0}),1===a)e.children=n;else if(a>1){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+3];e.children=o}if(e&&i)for(var c in i)void 0===e[c]&&(e[c]=i[c]);else e||(e=i||{});return{$$typeof:u,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}function D(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function F(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class P extends l.Component{constructor(t){var e,r={},n={},i={};super(t),e=this,F(this,"buildGraphData",function(){D(this,r);const{id:t,capacity:n,dataType:i,fType:a,city:o}=e.props,s={};n.forEach(function(e){switch(a){case"international":if(e[i].country.id==t)return;break;case"domestic":if(e.dep.country.id!=e.arr.country.id)return}const r=e[i]["city"==o?"city":"country"];s[r.id]||(s[r.id]={...r,total:0}),s[r.id].total+=(0,b.A)({field:"seats",route:e,id:this.props.id,type:this.props.type})},e);let c=[];for(const t in s)c.push(s[t]);return c=c.sort(e.totalSort),c}.bind(r)),F(this,"setDisplayOptions",function(){D(this,n);const t=e.buildGraphData().slice(0,10),r=[],i=[];t.forEach(function(t){i.push(t.name),r.push(t.total)});const a=(0,g.A)("seats",e.props.fType);return{graph:{chart:{type:"bar"},xAxis:{categories:i,title:{text:"city"==e.props.city?"City":"Country/Territory"}},yAxis:{title:{text:a}},tooltip:{formatter:(0,k.A)(e.props.dataType)},series:[{data:r}]},csv:e.buildCSVData(t)}}.bind(n)),F(this,"buildCSVData",function(t){D(this,i);const r=[["City",(0,g.A)("seats",e.props.fType)]];return t.forEach(function(t){r.push([t.name,t.total])}),r}.bind(i)),(0,T.A)({setField:C.x,makeFTypesMenu:A.Zt},this)}totalSort(t,e){return t.total<e.total?1:t.total>e.total?-1:0}render(){const{capacity:t,name:e,date:r,bare:u,id:p,type:l,cargo:b,dataType:g,city:k,fType:C,myCAPA:A}=this.props;if(t){const t=this.setDisplayOptions(),c=this.makeFTypesMenu(!0),y=S("div",{},void 0,S("div",{},void 0,!A&&!u&&S(q.A,{id:"profile-top-ten-country",name:e+" top ten capacity",settings:{id:p,type:l,dataType:g,cargo:b,city:k,fType:C}}),A?"T":e+" t","op ten ",c," ",S("select",{value:g,onChange:this.setField("dataType")},void 0,n||(n=S("option",{value:"dep"},void 0,"departing")),i||(i=S("option",{value:"arr"},void 0,"arriving")))," ","seats by"," ",S("select",{value:k,onChange:this.setField("city")},void 0,a||(a=S("option",{value:"city"},void 0,"city")),o||(o=S("option",{value:"country"},void 0,"country/territory")))),S("div",{className:"week"},void 0,"Week commencing ",(0,f.GP)((0,d.D5)(r),"dd-MMM-yyyy"))),T=s||(s=S(m.Md,{})),w=["capa","oag"];return S(v.A,{filename:e+" top ten cities",data:t.csv},void 0,S(h.A,{config:t.graph,watermark:w,className:"graph",header:y,footer:T,noExport:u,isTrial:this.props.isTrial}))}return c||(c=S(y.A,{text:"Loading top ten cities/countries/territories"}))}}var M=(0,w.A)(P,{dataType:"dep",fType:"system",city:"city"}),x=(0,p.A)(M)},5743:function(t,e,r){var n=r(25602),i=r(92517),a=r(41003),o=r(92369),s=r(28802),c=r(65290),u=r(18911),p=r(97094),l=r.n(p);function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f.apply(null,arguments)}function d(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function y(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}e.A=function(t){class e extends n.Component{constructor(...e){var r,n={},o={};super(...e),r=this,y(this,"getCapacity",function(t){d(this,n);const{date:e,id:o,type:u,capacity:p,marketCapacity:l,dispatch:f}=r.props,y="marketing"===t?l:p,h=(0,i.GP)((0,a.D5)(e),"dd-MMM-yyyy");let v="capacity-"+u+"-"+o+"-"+h+"-"+t;y||(0,c.VP)(v)||f((0,s.lD)({loadID:v,id:o,type:u,date:h,attribution:t}))}.bind(n)),y(this,"getCapacities",function(){d(this,o),Object.prototype.hasOwnProperty.call(r.props,"marketCapacity")?(r.getCapacity("marketing"),l()(r.props.type,t.carrierGrouping)&&r.getCapacity("operating")):r.getCapacity("operating")}.bind(o))}componentDidMount(){this.getCapacities()}componentDidUpdate(t){const{capacity:e,marketCapacity:r}=this.props;(!e&&t.capacity||!r&&t.marketCapacity)&&this.getCapacities()}render(){const e=Object.prototype.hasOwnProperty.call(this.props,"marketCapacity")&&!l()(this.props.type,t.carrierGrouping)?this.props.marketCapacity:this.props.capacity;return n.createElement(t,f({},this.props,{capacity:e}))}}const r=(0,u.y)("capacity");return(0,o.Ng)(r)(e)}},61095:function(t,e,r){r.r(e);var n=r(25602),i=r(43647),a=r(38415);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o.apply(null,arguments)}const s=function(t){!function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(this,void 0);const{settingKey:e}=t,r=(0,a.dU)(e);return r?n.createElement(i.A,o({},t,r)):null}.bind(void 0);e.default=s},38415:function(t,e,r){r.d(e,{M3:function(){return y},Mr:function(){return k},OX:function(){return b},Q3:function(){return C},SM:function(){return v},TE:function(){return m},dS:function(){return d},dU:function(){return g},t0:function(){return l},vA:function(){return A},xc:function(){return f}});var n=r(25602),i=r(92369),a=r(50919),o=r(56243),s=r(89754),c=r(44711),u=r(28802);function p(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function l(t){var e=this;return(0,i.d4)(function(r){return p(this,e),r.toolSettings[t]}.bind(this),{equalityFn:i.bN})}function f(t){var e=this;return(0,i.d4)(function(r){p(this,e);const n=r.data.profiles,{type:i,id:a}=r.toolSettings[t];return n[i]&&n[i][a]?n[i][a]:{}}.bind(this),{equalityFn:i.bN})}function d(t){var e=this;const r=(0,i.wA)(),a=l(t),o=f(t),{id:s,type:c}=a,d="mycapa-profile-"+c+"-"+s,y=(0,i.d4)(function(t){return p(this,e),t.loading[d]}.bind(this),{equalityFn:i.bN}),{info:h}=o;return(0,n.useEffect)(function(){p(this,e),h||y||r((0,u.qk)({id:s,type:c,loadID:d}))}.bind(this),[]),h}function y(){var t=this;return(0,i.d4)(function(e){return p(this,t),e.loading}.bind(this),{equalityFn:i.bN})}function h(t,{profileKey:e,actionCreator:r,loadIDPrefix:a,mapResult:o}){var s=this;const c=(0,i.wA)(),u=l(t),d=f(t),{id:y,type:h}=u,v=d[e];return(0,n.useEffect)(function(){p(this,s),v||c(r({id:y,loadID:a+"-"+h+"-"+y,type:h}))}.bind(this),[c,r,y,a,v,h]),v?o(v):null}function v(t){var e=this;return h(t,{profileKey:"codeshares",actionCreator:u.qT,loadIDPrefix:"codeshares-data",mapResult:function(t){return p(this,e),{codeshares:t}}.bind(this)})}function m(t,e=!1){const r=l(t),n=f(t),i=d(t);if(!i)return null;return{...r,date:i.eto?(0,o.W)((0,a.S)(i.eto)):(0,o.W)((0,s.b)(new Date)),fleet:n[e?"currentFleet":"fleet"]}}function b(t){return m(t,!0)}function g(t){const e=l(t),r=f(t),n=d(t);if(!n)return null;const i=(0,o.W)((0,s.b)(new Date)),a=e.country||(n.country&&n.country.id?n.country.id:4==e.type?e.id:0);return{...e,date:i,country:a,capacity:r.capacity,marketCapacity:r.marketCapacity}}function k(t){var e=this;return h(t,{profileKey:"sustainability",actionCreator:u.sg,loadIDPrefix:"sustainability-data",mapResult:function(t){return p(this,e),{sustainability:t.data,source:t.meta.source,fNotes:t.meta.note}}.bind(this)})}function C(t){var e=this;return h(t,{profileKey:"safContracts",actionCreator:u.ib,loadIDPrefix:"saf-contracts-data",mapResult:function(t){return p(this,e),{safContracts:t.data}}.bind(this)})}function A(t,e){var r=this;const n=(0,i.d4)(function(t){return p(this,r),t.user.activesubs}.bind(this),{equalityFn:i.bN});return"boolean"==typeof e?e:(0,c.mv)(n,t)}},35009:function(t,e){e.A=.621371192},44058:function(t,e,r){r.d(e,{A:function(){return a}}),r.dn(a);var n=r(35009);const i=function({route:t,depArr:e,id:r,type:n}){switch(n){case 2:return t[e].id==r?t.freq[e]:0;case 4:return t[e].country.id==r?t.freq[e]:0;case 5:return t[e].country.region.id==r?t.freq[e]:0;case 6:return t[e].country.region.metaregion.id==r?t.freq[e]:0;default:return t.freq[e]}};function a({field:t,route:e,id:r,type:a=1}){switch(t){case"seats":return e.seats.total;case"asks":return e.seats.asks;case"asms":return Math.round(e.seats.asks*n.A);case"aftks":return e.freight.aftks;case"aftms":return Math.round(e.freight.aftks*n.A);case"freight":case"payload":return e.freight.total;case"depfreq":case"freq":return i({route:e,depArr:"dep",id:r,type:a});case"arrfreq":return i({route:e,depArr:"arr",id:r,type:a});case"movements":return i({route:e,depArr:"dep",id:r,type:a})+i({route:e,depArr:"arr",id:r,type:a})}}},88310:function(t,e,r){var n,i,a,o,s,c,u,p,l,f,d,y,h,v,m,b,g,k,C,A,T;r(25602);function w(t,e,r,n){T||(T="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=t&&t.defaultProps,a=arguments.length-3;if(e||0===a||(e={children:void 0}),1===a)e.children=n;else if(a>1){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+3];e.children=o}if(e&&i)for(var c in i)void 0===e[c]&&(e[c]=i[c]);else e||(e=i||{});return{$$typeof:T,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}r.d(e,["$U",0,function(t,e,r,f){const d=f?this.props:this.state;let y;return t?y=[n||(n=w("option",{value:"payload"},"payload","cargo payload (kg)")),i||(i=w("option",{value:"aftks"},"aftks","AFTKs")),a||(a=w("option",{value:"aftms"},"aftms","AFTMs"))]:(y=[o||(o=w("option",{value:"seats"},"seats","seats")),s||(s=w("option",{value:"asks"},"asks","ASKs")),c||(c=w("option",{value:"asms"},"asms","ASMs"))],r||y.push(u||(u=w("option",{value:"depfreq"},"depfreq","departing frequency"))),e||(r||y.push(p||(p=w("option",{value:"arrfreq"},"arrfreq","arriving frequency"))),y.push(l||(l=w("option",{value:"movements"}
1,"movements","movements"))))),w("select",{value:d.dataType,onChange:this.setField("dataType")},void 0,y)},"B4",0,function(t,e){const r=e?this.props:this.state,n={line:b||(b=w("option",{value:"line"},"line","line chart")),column:g||(g=w("option",{value:"column"},"column","column chart")),bar:k||(k=w("option",{value:"bar"},"bar","bar chart")),pie:C||(C=w("option",{value:"pie"},"pie","pie chart")),map:A||(A=w("option",{value:"map"},"map","map"))},i=t.map(function(t){return n[t]});return w("div",{className:"chartType"},void 0,w("label",{},void 0,"Show as"," ",w("select",{value:r.chartType,onChange:this.setField("chartType")},void 0,i)))},"Y1",0,function(t){return w("div",{className:"subheading"},void 0,w("label",{},void 0,w("input",{type:"checkbox",checked:(t?this.props:this.state).home,onChange:this.toggleField("home")})," ","Include home country/territory departures"))},"Zt",0,function(t){return w("select",{value:(t?this.props:this.state).fType,onChange:this.setField("fType")},void 0,f||(f=w("option",{value:"system"},void 0,"system")),d||(d=w("option",{value:"international"},void 0,"international")),y||(y=w("option",{value:"domestic"},void 0,"domestic")))},"rn",0,function(t){return w("select",{value:(t?this.props:this.state).bellyType,onChange:this.setField("bellyType")},void 0,h||(h=w("option",{value:"total"},void 0,"total")),v||(v=w("option",{value:"belly"},void 0,"passenger")),m||(m=w("option",{value:"freighter"},void 0,"freighter")))}])},80159:function(t,e){e.A=function(t,e){let r="Number of ";switch(e&&(r+=" "+e),t){case"seats":r+=" seats";break;case"aftks":r+=" AFTKs";break;case"aftms":r+=" AFTMs";break;case"freight":case"cargo":case"payload":r="Cargo payload (kg)";break;case"asks":r+=" ASKs";break;case"asms":r+=" ASMs";break;case"depfreq":case"freq":r+=" departing frequencies";break;case"arrfreq":r+=" arriving frequencies";break;case"destinations":r+=" destinations";break;case"movements":r+=" movements";break;case"routes":r+=" routes"}return r}},50919:function(t,e,r){r.d(e,{S:function(){return i}});var n=r(97245);function i(t,e){return(0,n.a)(1e3*t,e?.in)}},56243:function(t,e,r){r.d(e,{W:function(){return i}});var n=r(97245);function i(t){return+(0,n.a)(t)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.