-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path608-es5.889faad3f62352ff7f15.js
More file actions
2 lines (2 loc) · 10.1 KB
/
608-es5.889faad3f62352ff7f15.js
File metadata and controls
2 lines (2 loc) · 10.1 KB
1
2
!function(){"use strict";function t(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],a=!0,c=!1;try{for(e=e.call(t);!(a=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(u){c=!0,i=u}finally{try{a||null==e.return||e.return()}finally{if(c)throw i}}return o}(t,n)||e(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,n){if(t){if("string"==typeof t)return r(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,n):void 0}}function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function o(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,n,e){return n&&o(t.prototype,n),e&&o(t,e),t}(self.webpackChunkrxjs_dev=self.webpackChunkrxjs_dev||[]).push([[608],{6608:function(e,r,o){o.r(r),o.d(r,{OperatorDecisionTreeModule:function(){return Q}});var c,u=o(54364),s=o(70781),p=o(42118),l=o(24298),f=o(29026),h=o(2316),d=o(53882),g=((c=function(){function t(n){i(this,t),this.http=n}return a(t,[{key:"getDecisionTree$",value:function(){return this.http.get("/generated/docs/app/decision-tree-data.json")}}]),t}()).\u0275fac=function(t){return new(t||c)(h.LFG(d.eN))},c.\u0275prov=h.Yz7({token:c,factory:c.\u0275fac}),c),v=o(97175),m=o(69606),y=o(47599),b=o(57850),x=o(34864),Z=o(41757),T=o(76477),A=o(49005),I=o(43497);function $(t){return!t.error}var S=function(){var e=function(){function e(t){i(this,e),this.dataService=t,this.initialState={previousBranchIds:["initial"],currentBranchId:"initial"},this.state$=new m.X(this.initialState),this.tree$=this.dataService.getDecisionTree$().pipe((0,x.K)(function(t){return(0,y.of)(t)}),(0,Z.d)()),this.currentSentence$=(0,b.a)(this.tree$,this.state$).pipe((0,T.h)(function(t){return $(n(t,1)[0])}),(0,A.U)(function(t){var e=n(t,2),r=e[0],i=e[1].previousBranchIds;return function(t){return t.includes("initial")&&1===t.length}(i)?"\u4ece\u4e0b\u8868\u4e2d\u9009\u62e9\u4e00\u4e2a\u9009\u9879\uff0c\u4ee5\u5f00\u59cb\u51b3\u7b56":"".concat(i.map(function(t){return r[t].label}).join(" "),"...").trim()})),this.options$=(0,b.a)(this.tree$,this.state$).pipe((0,T.h)(function(t){var e=n(t,2),r=e[0],i=e[1];return $(r)&&!!r[i.currentBranchId]&&!!r[i.currentBranchId].options}),(0,A.U)(function(t){var e=n(t,2),r=e[0],i=e[1],o=r[i.currentBranchId];return function(t){return!!t.options}(o)?o.options.map(function(t){return r[t]}):r.initial.options.map(function(t){return r[t]})})),this.isBeyondInitialQuestion$=this.state$.pipe((0,A.U)(function(t){return"initial"!==t.currentBranchId})),this.hasError$=this.tree$.pipe((0,T.h)(function(t){return!!t.error}),(0,I.h)(!0))}return a(e,[{key:"snapShot",get:function(){return this.state$.getValue()}},{key:"selectOption",value:function(n){this.state$.next({previousBranchIds:[].concat(t(this.snapShot.previousBranchIds),[n]),currentBranchId:n})}},{key:"back",value:function(){var n=this.snapShot.previousBranchIds[this.snapShot.previousBranchIds.length-2];n&&this.state$.next({previousBranchIds:t(this.snapShot.previousBranchIds.slice(0,this.snapShot.previousBranchIds.length-1)),currentBranchId:n})}},{key:"startOver",value:function(){this.state$.next(this.initialState)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(h.LFG(g))},e.\u0275prov=h.Yz7({token:e,factory:e.\u0275fac}),e}(),k=function(){var t=function(){function t(){i(this,t)}return a(t,[{key:"transform",value:function(t){switch(t){case"class":return"\u7c7b";case"function":return"\u51fd\u6570";default:return t}}}]),t}();return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=h.Yjl({name:"docTypeName",type:t,pure:!0}),t}();function w(t,n){if(1&t){var e=h.EpF();h.ynx(0),h.TgZ(1,"section"),h.TgZ(2,"button",6),h.NdJ("click",function(){return h.CHM(e),h.oxw(2).back()}),h._uU(3,"\u540e\u9000 "),h.qZA(),h.TgZ(4,"button",7),h.NdJ("click",function(){return h.CHM(e),h.oxw(2).startOver()}),h._uU(5,"\u91cd\u65b0\u5f00\u59cb "),h.qZA(),h.qZA(),h.BQk()}}function O(t,n){if(1&t){var e=h.EpF();h.ynx(0),h.TgZ(1,"button",9),h.NdJ("click",function(t){h.CHM(e);var n=h.oxw().$implicit;return h.oxw(2).selectOption(n.id,t)}),h.TgZ(2,"mat-card",10),h._uU(3),h.qZA(),h.qZA(),h.BQk()}if(2&t){var r=h.oxw().$implicit;h.xp6(1),h.Q6J("@flyIn",void 0),h.xp6(2),h.hij(" ",r.label," ")}}function _(t,n){if(1&t&&(h.TgZ(0,"p",12),h._uU(1," \u4f60\u9700\u8981 "),h.TgZ(2,"a",13),h._uU(3),h.qZA(),h._uU(4),h.ALo(5,"docTypeName"),h.qZA()),2&t){var e=h.oxw(2).$implicit;h.xp6(2),h.hYB("href","",e.path,"#",e.method,"",h.LSH),h.xp6(1),h.Oqu(e.label),h.xp6(1),h.AsE(" ",h.lcZ(5,5,e.docType)," \u4e2d\u7684 ",e.method," \u65b9\u6cd5\u3002 ")}}function B(t,n){if(1&t&&(h.TgZ(0,"p",12),h._uU(1," \u4f60\u9700\u8981 "),h.TgZ(2,"a",13),h._uU(3),h.ALo(4,"docTypeName"),h.qZA(),h._uU(5,"\u3002 "),h.qZA()),2&t){var e=h.oxw(2).$implicit;h.xp6(2),h.s9C("href",e.path,h.LSH),h.xp6(1),h.AsE("",e.label," ",h.lcZ(4,3,e.docType),"")}}function U(t,n){if(1&t&&(h.YNc(0,_,6,7,"p",11),h.YNc(1,B,6,5,"p",11)),2&t){var e=h.oxw().$implicit;h.Q6J("ngIf",e.method),h.xp6(1),h.Q6J("ngIf",!e.method)}}function C(t,n){if(1&t&&(h.ynx(0),h.YNc(1,O,4,2,"ng-container",1),h.YNc(2,U,2,2,"ng-template",null,8,h.W1O),h.BQk()),2&t){var e=n.$implicit,r=h.MAs(3);h.xp6(1),h.Q6J("ngIf",e.options)("ngIfElse",r)}}function q(t,n){if(1&t&&(h.ynx(0),h.TgZ(1,"h2",3),h._uU(2),h.ALo(3,"async"),h.qZA(),h.YNc(4,w,6,0,"ng-container",4),h.ALo(5,"async"),h.TgZ(6,"div"),h.YNc(7,C,4,2,"ng-container",5),h.ALo(8,"async"),h.qZA(),h.BQk()),2&t){var e=h.oxw();h.xp6(2),h.hij(" ",h.lcZ(3,3,e.currentSentence$)," "),h.xp6(2),h.Q6J("ngIf",h.lcZ(5,5,e.isBeyondInitialQuestion$)),h.xp6(3),h.Q6J("ngForOf",h.lcZ(8,7,e.options$))}}function M(t,n){1&t&&(h.TgZ(0,"div",14),h.TgZ(1,"p",15),h._uU(2,"\u554a\u54e6\uff01\u52a0\u8f7d\u51b3\u7b56\u6811\u65f6\u51fa\u4e86\u70b9\u95ee\u9898\u2026\u2026\u975e\u5e38\u62b1\u6b49\u3002\u8bf7\u5c1d\u8bd5\u5237\u65b0\u672c\u9875\u9762\u3002"),h.qZA(),h.TgZ(3,"p",16),h._uU(4,"Oops! There was an issue loading the decision tree.. we're real sorry about that. Please try reloading the page."),h.qZA(),h.TgZ(5,"p",15),h._uU(6,"\u4f60\u8fd8\u53ef\u4ee5\u8bd5\u8bd5"),h.TgZ(7,"a",17),h._uU(8,"\u5728 Github \u63d0\u4ea4\u4e00\u4e2a Issue"),h.qZA(),h._uU(9,"\u3002"),h.qZA(),h.TgZ(10,"p",16),h._uU(11,"You can also try "),h.TgZ(12,"a",17),h._uU(13,"submitting an issue on Github"),h.qZA(),h._uU(14,"."),h.qZA(),h.qZA())}var E=function(){var t=function(){function t(n,e){i(this,t),this.operatorDecisionTreeService=n,this.scrollService=e,this.currentSentence$=this.operatorDecisionTreeService.currentSentence$,this.options$=this.operatorDecisionTreeService.options$,this.isBeyondInitialQuestion$=this.operatorDecisionTreeService.isBeyondInitialQuestion$,this.hasError$=this.operatorDecisionTreeService.hasError$}return a(t,[{key:"selectOption",value:function(t){this.operatorDecisionTreeService.selectOption(t),this.scrollService.scrollToTop()}},{key:"back",value:function(){this.operatorDecisionTreeService.back()}},{key:"startOver",value:function(){this.operatorDecisionTreeService.startOver()}},{key:"ngOnDestroy",value:function(){this.startOver()}}]),t}();return t.\u0275fac=function(n){return new(n||t)(h.Y36(S),h.Y36(f.a))},t.\u0275cmp=h.Xpm({type:t,selectors:[["aio-operator-decision-tree"]],decls:6,vars:4,consts:[["tabindex","0",1,"mat-heading"],[4,"ngIf","ngIfElse"],["hasErrorTemplate",""],["tabindex","0",1,"mat-subheading-2"],[4,"ngIf"],[4,"ngFor","ngForOf"],["mat-button","",1,"back",3,"click"],["mat-button","","color","warn",1,"start-over",3,"click"],["operatorTempalte",""],[1,"option","mat-body-1",3,"click"],["matRipple",""],["class","mat-body-1",4,"ngIf"],[1,"mat-body-1"],[3,"href"],[1,"mat-body-1","error"],["translation-result","on"],["translation-origin","off"],["href","https://github.com/ReactiveX/rxjs/issues/new?template=documentation.md","target","_blank"]],template:function(t,n){if(1&t&&(h.TgZ(0,"h1",0),h._uU(1," \u64cd\u4f5c\u7b26\u51b3\u7b56\u6811\n"),h.qZA(),h.YNc(2,q,9,9,"ng-container",1),h.ALo(3,"async"),h.YNc(4,M,15,0,"ng-template",null,2,h.W1O)),2&t){var e=h.MAs(5);h.xp6(2),h.Q6J("ngIf",!h.lcZ(3,2,n.hasError$))("ngIfElse",e)}},directives:[u.O5,u.sg,s.lW,p.a8,l.wG],pipes:[u.Ov,k],styles:["h2[_ngcontent-%COMP%]{max-width:700px}button.option[_ngcontent-%COMP%]{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);border-radius:34px;border:0;cursor:pointer;display:block;margin-bottom:12px;padding:0;text-align:left}button.option[_ngcontent-%COMP%]:active, button.option[_ngcontent-%COMP%]:hover, button.option[_ngcontent-%COMP%]:focus{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}button.option[_ngcontent-%COMP%]:active mat-card[_ngcontent-%COMP%], button.option[_ngcontent-%COMP%]:hover mat-card[_ngcontent-%COMP%], button.option[_ngcontent-%COMP%]:focus mat-card[_ngcontent-%COMP%]{background-color:#d81b60;color:#fff}mat-card[_ngcontent-%COMP%]{border-radius:34px;padding:12px 24px;transition:all .25s}section[_ngcontent-%COMP%]{margin-bottom:16px}"],data:{animation:[(0,v.X$)("flyIn",[(0,v.SB)("in",(0,v.oB)({transform:"translateX(0)"})),(0,v.eR)(":enter",[(0,v.oB)({transform:"translateX(-100%)"}),(0,v.jt)(250)])])]}}),t}(),Q=function(){var t=function t(){i(this,t),this.customElementComponent=E};return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=h.oAB({type:t}),t.\u0275inj=h.cJS({providers:[g,S,f.a],imports:[[u.ez,s.ot,p.QW,l.si]]}),t}()}}])}();
//# sourceMappingURL=608-es5.889faad3f62352ff7f15.js.map