1"use strict";(self.webpackChunkcapa_frontend=self.webpackChunkcapa_frontend||[]).push([[4385],{35094:function(t,e,n){n.d(e,{A:function(){return x}});var r,i,a,o,s,c,u,p=n(5743),l=n(25602),d=n(92517),f=n(41003),y=n(26045),h=n.n(y),v=n(85284),m=n(112),b=n(44058),g=n(83237),C=n(69614),k=n(88310),w=n(36826),T=n(10626),A=n(49851),q=n(95300),S=n(7391),D=n(4728),P=n(98308),M=n(29995);function F(t,e,n,r){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=r;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===n?null:""+n,ref:null,props:e,_owner:null}}function O(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function E(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;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:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class N extends l.Component{constructor(t){var e,n={},r={},i={};super(t),e=this,E(this,"buildGraphData",function(){O(this,n);const{capacity:t,dataType:r,fType:i,direction:a,type:o,id:s}=e.props,c={};t.forEach(function(t){switch(i){case"international":if(t.dep.country.id==t.arr.country.id)return;break;case"domestic":if(t.dep.country.id!=t.arr.country.id)return}let e=t.dep.id,n=t.arr.id;4==o&&(e=t.dep.country.id,n=t.arr.country.id),5==o&&(e=t.dep.country.region.id,n=t.arr.country.region.id),6==o&&(e=t.dep.country.region.metaregion.id,n=t.arr.country.region.metaregion.id),"departing"==a&&e!=s||"arrival"==a&&n!=s||e!=s&&n!=s||(c[t.airline.alliance.id]||(c[t.airline.alliance.id]={name:t.airline.alliance.name||"Unaligned",total:0}),c[t.airline.alliance.id].total+=(0,b.A)({field:r,route:t,id:this.props.id,type:this.props.type}))},e);const u=[];for(const t in c)c[t].total&&u.push([c[t].name,c[t].total]);return u}.bind(n)),E(this,"setDisplayOptions",function(){O(this,r);const t=e.buildGraphData(),n=h()(v.he);n.series=[{data:t}],n.tooltip={formatter:(0,g.A)(e.props.dataType)};return{graph:n,csv:e.buildCSVData(t)}}.bind(r)),E(this,"buildCSVData",function(t){O(this,i);const e=[["Alliance","Total"]];return t.forEach(function(t){e.push(t)}),e}.bind(i));const{dispatch:a,settingKey:o,cargo:s,persist:c}=t;(0,w.A)({setField:C.x,makeFTypesMenu:k.Zt,makeTypesMenu:k.$U},this),a({type:M.C1,persist:c,settingKey:o,data:{dataType:s?"payload":"seats"}})}render(){const{capacity:t,name:e,date:n,bare:u,id:p,type:l,cargo:y,dataType:h,direction:v,fType:b,myCAPA:g}=this.props;if(t&&h){const t=this.setDisplayOptions(),c=this.makeTypesMenu(y,!1,!1,!0),m=this.makeFTypesMenu(!0),C=F("div",{},void 0,F("div",{},void 0,!g&&!u&&F(P.A,{id:"profile-capacity-alliance",name:e+" capacity by airline alliance",settings:{id:p,type:l,cargo:y,direction:v,dataType:h,fType:b}}),!g&&e," ",m," ",F("select",{value:v,onChange:this.setField("direction")},void 0,r||(r=F("option",{value:"departing"},void 0,"departing")),i||(i=F("option",{value:"arrival"},void 0,"arriving")),a||(a=F("option",{value:"both"},void 0,"two-way")))," ",c," by airline alliance"),F("div",{className:"week"},void 0,"Week commencing ",(0,d.GP)((0,f.D5)(n),"dd-MMM-yyyy"))),k=o||(o=F(S.Md,{})),w=["capa","oag"];let D;return!u&&this.props.cargo&&(D=s||(s=F(T.CW,{}))),F(q.A,{filename:e+" by airline alliance",data:t.csv},void 0,F(A.A,{config:t.graph,watermark:w,className:"graph",header:C,footer:k,note:D,noExport:u,isTrial:this.props.isTrial}))}return c||(c=F(m.A,{text:"Loading capacity by airline alliance"}))}}var j=(0,D.A)(N,{fType:"system",direction:"departing"},!0),x=(0,p.A)(j)},5743:function(t,e,n){var r=n(25602),i=n(92517),a=n(41003),o=n(92369),s=n(28802),c=n(65290),u=n(18911),p=n(97094),l=n.n(p);function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},d.apply(null,arguments)}function f(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function y(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;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:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.A=function(t){class e extends r.Component{constructor(...e){var n,r={},o={};super(...e),n=this,y(this,"getCapacity",function(t){f(this,r);const{date:e,id:o,type:u,capacity:p,marketCapacity:l,dispatch:d}=n.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)||d((0,s.lD)({loadID:v,id:o,type:u,date:h,attribution:t}))}.bind(r)),y(this,"getCapacities",function(){f(this,o),Object.prototype.hasOwnProperty.call(n.props,"marketCapacity")?(n.getCapacity("marketing"),l()(n.props.type,t.carrierGrouping)&&n.getCapacity("operating")):n.getCapacity("operating")}.bind(o))}componentDidMount(){this.getCapacities()}componentDidUpdate(t){const{capacity:e,marketCapacity:n}=this.props;(!e&&t.capacity||!n&&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 r.createElement(t,d({},this.props,{capacity:e}))}}const n=(0,u.y)("capacity");return(0,o.Ng)(n)(e)}},4385:function(t,e,n){n.r(e);var r=n(25602),i=n(35094),a=n(38415);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}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,n=(0,a.dU)(e);return n?r.createElement(i.A,o({},t,n)):null}.bind(void 0);e.default=s},38415:function(t,e,n){n.d(e,{M3:function(){return y},Mr:function(){return C},OX:function(){return b},Q3:function(){return k},SM:function(){return v},TE:function(){return m},dS:function(){return f},dU:function(){return g},t0:function(){return l},vA:function(){return w},xc:function(){return d}});var r=n(25602),i=n(92369),a=n(50919),o=n(56243),s=n(89754),c=n(44711),u=n(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(n){return p(this,e),n.toolSettings[t]}.bind(this),{equalityFn:i.bN})}function d(t){var e=this;return(0,i.d4)(function(n){p(this,e);const r=n.data.profiles,{type:i,id:a}=n.toolSettings[t];return r[i]&&r[i][a]?r[i][a]:{}}.bind(this),{equalityFn:i.bN})}function f(t){var e=this;const n=(0,i.wA)(),a=l(t),o=d(t),{id:s,type:c}=a,f="mycapa-profile-"+c+"-"+s,y=(0,i.d4)(function(t){return p(this,e),t.loading[f]}.bind(this),{equalityFn:i.bN}),{info:h}=o;return(0,r.useEffect)(function(){p(this,e),h||y||n((0,u.qk)({id:s,type:c,loadID:f}))}.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:n,loadIDPrefix:a,mapResult:o}){var s=this;const c=(0,i.wA)(),u=l(t),f=d(t),{id:y,type:h}=u,v=f[e];return(0,r.useEffect)(function(){p(this,s),v||c(n({id:y,loadID:a+"-"+h+"-"+y,type:h}))}.bind(this),[c,n,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 n=l(t),r=d(t),i=f(t);if(!i)return null;return{...n,date:i.eto?(0,o.W)((0,a.S)(i.eto)):(0,o.W)((0,s.b)(new Date)),fleet:r[e?"currentFleet":"fleet"]}}function b(t){return m(t,!0)}function g(t){const e=l(t),n=d(t),r=f(t);if(!r)return null;const i=(0,o.W)((0,s.b)(new Date)),a=e.country||(r.country&&r.country.id?r.country.id:4==e.type?e.id:0);return{...e,date:i,country:a,capacity:n.capacity,marketCapacity:n.marketCapacity}}function C(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 k(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 w(t,e){var n=this;const r=(0,i.d4)(function(t){return p(this,n),t.user.activesubs}.bind(this),{equalityFn:i.bN});return"boolean"==typeof e?e:(0,c.mv)(r,t)}},35009:function(t,e){e.A=.621371192},44058:function(t,e,n){n.d(e,{A:function(){return a}}),n.dn(a);var r=n(35009);const i=function({route:t,depArr:e,id:n,type:r}){switch(r){case 2:return t[e].id==n?t.freq[e]:0;case 4:return t[e].country.id==n?t.freq[e]:0;case 5:return t[e].country.region.id==n?t.freq[e]:0;case 6:return t[e].country.region.metaregion.id==n?t.freq[e]:0;default:return t.freq[e]}};function a({field:t,route:e,id:n,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*r.A);case"aftks":return e.freight.aftks;case"aftms":return Math.round(e.freight.aftks*r.A);case"freight":case"payload":return e.freight.total;case"depfreq":case"freq":return i({route:e,depArr:"dep",id:n,type:a});case"arrfreq":return i({route:e,depArr:"arr",id:n,type:a});case"movements":return i({route:e,depArr:"dep",id:n,type:a})+i({route:e,depArr:"arr",id:n,type:a})}}},88310:function(t,e,n){var r,i,a,o,s,c,u,p,l,d,f,y,h,v,m,b,g,C,k,w,T;n(25602);function A(t,e,n,r){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=r;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===n?null:""+n,ref:null,props:e,_owner:null}}n.d(e,["$U",0,function(t,e,n,d){const f=d?this.props:this.state;let y;return t?y=[r||(r=A("option",{value:"payload"},"payload","cargo payload (kg)")),i||(i=A("option",{value:"aftks"},"aftks","AFTKs")),a||(a=A("option",{value:"aftms"},"aftms","AFTMs"))]:(y=[o||(o=A("option",{value:"seats"},"seats","seats")),s||(s=A("option",{value:"asks"},"asks","ASKs")),c||(c=A("option",{value:"asms"},"asms","ASMs"))],n||y.push(u||(u=A("option",{value:"depfreq"},"depfreq","departing frequency"))),e||(n||y.push(p||(p=A("option",{value:"arrfreq"},"arrfreq","arriving frequency"))),y.push(l||(l=A("option",{value:"movements"}
1,"movements","movements"))))),A("select",{value:f.dataType,onChange:this.setField("dataType")},void 0,y)},"B4",0,function(t,e){const n=e?this.props:this.state,r={line:b||(b=A("option",{value:"line"},"line","line chart")),column:g||(g=A("option",{value:"column"},"column","column chart")),bar:C||(C=A("option",{value:"bar"},"bar","bar chart")),pie:k||(k=A("option",{value:"pie"},"pie","pie chart")),map:w||(w=A("option",{value:"map"},"map","map"))},i=t.map(function(t){return r[t]});return A("div",{className:"chartType"},void 0,A("label",{},void 0,"Show as"," ",A("select",{value:n.chartType,onChange:this.setField("chartType")},void 0,i)))},"Y1",0,function(t){return A("div",{className:"subheading"},void 0,A("label",{},void 0,A("input",{type:"checkbox",checked:(t?this.props:this.state).home,onChange:this.toggleField("home")})," ","Include home country/territory departures"))},"Zt",0,function(t){return A("select",{value:(t?this.props:this.state).fType,onChange:this.setField("fType")},void 0,d||(d=A("option",{value:"system"},void 0,"system")),f||(f=A("option",{value:"international"},void 0,"international")),y||(y=A("option",{value:"domestic"},void 0,"domestic")))},"rn",0,function(t){return A("select",{value:(t?this.props:this.state).bellyType,onChange:this.setField("bellyType")},void 0,h||(h=A("option",{value:"total"},void 0,"total")),v||(v=A("option",{value:"belly"},void 0,"passenger")),m||(m=A("option",{value:"freighter"},void 0,"freighter")))}])},50919:function(t,e,n){n.d(e,{S:function(){return i}});var r=n(97245);function i(t,e){return(0,r.a)(1e3*t,e?.in)}},56243:function(t,e,n){n.d(e,{W:function(){return i}});var r=n(97245);function i(t){return+(0,r.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.