text: function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{Vwex:function(e,t,n){"use strict";n.r(t),n.d(t,"DistinctModule",(function(){return P}));var i=n("iInd"),r=function e(){_classCallCheck(this,e),this.fruits=["apple","apple","banana","apple"],this.expectedFruits=["apple","banana"],this.code='const fruits = from([\n    "apple",\n    "apple",\n    "banana",\n    "apple"]);\n\nfruits.pipe(\n\t\n).subscribe(fruit => toConveyorBelt(fruit));\n',this.minPositionLineNumber=7,this.positionColumnNumber=2,this.recipeDescription=""},c=n("8Y7J"),a=n("VIrA"),s=n("TSSN"),o=n("SVse"),p=n("dJsq"),b=n("uzYf");function u(e,t){if(1&e&&(c.Pb(0,"div"),c.Pb(1,"p"),c.qc(2,"Oh Nein! Wir bekommen mehr Fr\xfcchte geliefert als auf dem Rezept vorgegeben sind."),c.Ob(),c.Pb(3,"p"),c.qc(4,"Der pipe-Operator erm\xf6glicht uns, unterschiedliche RxJS-Operatoren nacheinander auszuf\xfchren um unsere Fr\xfcchte so zu erhalten, wie wir sie brauchen."),c.Ob(),c.Pb(5,"p"),c.qc(6,"In unserem Fall hilft uns der "),c.Pb(7,"code",4),c.qc(8,"distinct"),c.Ob(),c.qc(9,"-Operator. Er verhindert, dass in unserem Datenstrom doppelte Fr\xfcchte geliefert werden. "),c.Pb(10,"a",5),c.qc(11,"(Mehr Infos zu distinct)"),c.Ob(),c.Ob(),c.Ob()),2&e){c.bc();var n=c.ic(7);c.Bb(7),c.gc("appTooltip",n)}}function l(e,t){if(1&e&&(c.Pb(0,"div"),c.Pb(1,"p"),c.qc(2,"Oh no! We get more fruit than the recipe says."),c.Ob(),c.Pb(3,"p"),c.qc(4,"The pipe operator enables us to execute different RxJS operators one after the other in order to get our fruits as we need them."),c.Ob(),c.Pb(5,"p"),c.qc(6,"In our case, the "),c.Pb(7,"code",4),c.qc(8,"distinct"),c.Ob(),c.qc(9," operator helps us. It prevents duplicate fruits from being delivered in our data stream. "),c.Pb(10,"a",5),c.qc(11,"(Learn more about distinct)"),c.Ob(),c.Ob(),c.Ob()),2&e){c.bc();var n=c.ic(7);c.Bb(7),c.gc("appTooltip",n)}}function h(e,t){if(1&e&&(c.Pb(0,"div"),c.Pb(1,"p"),c.qc(2,"\u641e\u9519\u4e86\uff01\u5f97\u5230\u7684\u6c34\u679c\u6bd4\u98df\u8c31\u4e0a\u6307\u5b9a\u7684\u591a\u3002"),c.Ob(),c.Pb(3,"p"),c.qc(4,"pipe \u64cd\u4f5c\u7b26\u53ef\u4ee5\u4f9d\u6b21\u6267\u884c\u4e0d\u540c\u7684 RxJS \u64cd\u4f5c\u7b26\uff0c\u7528\u6765\u83b7\u53d6\u6211\u4eec\u9700\u8981\u7684\u7ed3\u679c\u3002"),c.Ob(),c.Pb(5,"p"),c.qc(6,"\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c"),c.Pb(7,"code",4),c.qc(8,"distinct"),c.Ob(),c.qc(9," \u64cd\u4f5c\u7b26\u53ef\u4ee5\u4e3a\u6211\u4eec\u63d0\u4f9b\u5e2e\u52a9\u3002\u5b83\u53ef\u4ee5\u9632\u6b62\u5728\u6570\u636e\u6d41\u4e2d\u4f20\u9012\u91cd\u590d\u7684\u6c34\u679c\u3002 "),c.Pb(10,"a",5),c.qc(11,"\uff08\u4e86\u89e3\u5173\u4e8e distinct \u64cd\u4f5c\u7b26\u7684\u66f4\u591a\u4fe1\u606f\uff09"),c.Ob(),c.Ob(),c.Ob()),2&e){c.bc();var n=c.ic(7);c.Bb(7),c.gc("appTooltip",n)}}var d,f,g,v=[{path:"",component:(d=function(){function e(t,n){_classCallCheck(this,e),this.exerciseService=t,this.translateService=n,this.exerciseTitle="distinct",this.distinctCode="\n  of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1).pipe(\n    distinct()\n  ).subscribe(data => console.log(data));\n\n  // Logs:\n  // 1\n  // 2\n  // 3\n  // 4\n  ",this.currentLanguage=""}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.exerciseService.newExercise(new r),this.currentLanguage=this.translateService.currentLang,this.onLangChangeSubscription=this.translateService.onLangChange.subscribe({next:function(){e.currentLanguage=e.translateService.currentLang}})}},{key:"ngOnDestroy",value:function(){this.onLangChangeSubscription.unsubscribe()}}]),e}(),d.\u0275fac=function(e){return new(e||d)(c.Mb(a.a),c.Mb(s.d))},d.\u0275cmp=c.Gb({type:d,selectors:[["app-distinct"]],decls:12,vars:8,consts:[[4,"ngIf"],[1,"tooltip","codeTooltip"],["tooltip",""],[3,"highlight"],[1,"help",3,"appTooltip"],["href","https://rxjs.dev/api/operators/distinct","target","_blank"]],template:function(e,t){1&e&&(c.Pb(0,"h3"),c.qc(1),c.cc(2,"translate"),c.Ob(),c.pc(3,u,12,1,"div",0),c.pc(4,l,12,1,"div",0),c.pc(5,h,12,1,"div",0),c.Pb(6,"div",1,2),c.Pb(8,"pre"),c.qc(9,"        "),c.Nb(10,"code",3),c.qc(11,"\n    "),c.Ob(),c.Ob()),2&e&&(c.Bb(1),c.tc("",c.dc(2,6,"EXERCISES.EXERCISETITLE"),": ",t.exerciseTitle,""),c.Bb(2),c.gc("ngIf","de"===t.currentLanguage),c.Bb(1),c.gc("ngIf","en"===t.currentLanguage),c.Bb(1),c.gc("ngIf","zh_CN"===t.currentLanguage),c.Bb(5),c.gc("highlight",t.distinctCode))},directives:[o.j,p.b,b.a],pipes:[s.c],styles:[""]}),d)}],O=((f=function e(){_classCallCheck(this,e)}).\u0275mod=c.Kb({type:f}),f.\u0275inj=c.Jb({factory:function(e){return new(e||f)},imports:[[i.d.forChild(v)],i.d]}),f),m=n("PCNd"),P=((g=function e(){_classCallCheck(this,e)}).\u0275mod=c.Kb({type:g}),g.\u0275inj=c.Jb({factory:function(e){return new(e||g)},imports:[[m.a,O]]}),g)}}]);